stack Learner

0

votes
1

answer
10

views

Retrofit 2 removes posrt after special character “:” from base Url

I have an Api https://hello.example.com:344/new/search/result. Implementing same using Retrofit 2: This is how initialising retrofit: public static void initializeRetrofit() { Retrofit retrofit = new Retrofit.Builder().baseUrl('https://hello.example.com:344') .addConverterFactory(GsonConverterFactor...
stack Learner
1

votes
1

answer
626

views

How to pass result from BottomSheetDialogFragment to Activity which started it?

I have attached BottomSheetDialogFragment to one of my fragment.In that bottom sheet ,I have given option open gallery open camera For Open gallery private void startGallery() { Intent intentGallery = new Intent(baseActivity, SelectImage.class); intentGallery.putExtra('LIMIT', 10); startActivityFo...
stack Learner
1

votes
0

answer
346

views

Loading images with glide blinks when calling notifyDatasetChanged listener

How to avoid flickering of imageview while using glide and calling notifyDataSetChanged on adapter. Every time on pull down refresh all the images will flicker. Glide.(context).load(attachment.get(2).getImageLoadingUrl()).override(destWidth,destheight) .placeholder(R.drawable.imageplaceholder) .fa...
stack Learner
1

votes
1

answer
613

views

How to generate react native android apk for production?

I am to trying to generate android apk for react native . Going through document given at https://facebook.github.io/react-native/docs/signed-apk-android.html#content 1)Generated the keystore 2) Setting up gradle variables 3)Adding signing config to your app's gradle config # 4) Generated signed ap...
stack Learner
1

votes
1

answer
99

views

Recycler view scrolls without collapsing toobar

Recycler view scrolls without collapsing toobar. This is my Main layout. This is the layout which I am setting in View Pager My Recycler view scrolls,even without collapsing toolbar sometimes.Alsothe scrolling is not smooth.In recyClerView of view pager i have a header item and then the list of item...
stack Learner
1

votes
2

answer
230

views

How to write a query in android using contentResolver to get images of particular date only from gallery?

I want to write a query in android using contentResolver to get images of particular date only from gallery? final String[] columns = { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID }; Cursor imagecursor = getApplicationContext().getContentResolver().query( MediaStore.Images.Media.EXTERN...
stack Learner
1

votes
2

answer
786

views

how to programatically set textColorHint to TextInputLayout?

I am trying to create editText having floating hint using Android TextInputLayout. I want to reuse the same TextInputLayout in two layouts.But in both the layout hint color is different. I searched through several links and found that we can set hint color in edittext(not the floating hint color) by...
stack Learner
1

votes
1

answer
188

views

How to get the file path of the document attached from Android File Manager

I am trying to attach the document from Android default File Manager and Uploading to server.But not able to get the path of file.Its giving the path as 'Intent { dat=content://com.google.android.apps.docs.storage/document/acc=1;doc=6 flg=0x1 }' How to convert it into proper path so that it provide...
stack Learner
1

votes
2

answer
290

views

Not able to refer to drawer layout in react native

I have my Js file like this. 'use strict' var React = require('react-native') var { AppRegistry, Component, StyleSheet, Text, View, TouchableNativeFeedback, Image, DrawerLayoutAndroid, Navigator, ListView, ToolbarAndroid } = React; var ToolbarAndroid = require('ToolbarAndroid'); var Drawer = require...
stack Learner
1

votes
4

answer
51

views

How to parse json file containing list inside a section in python?

I have a smaple.json as follows: {'Detail':[ { 'DocType':'txt', 'Name':'hello.txt', } ]} I need to have the value aginst the 'Name' Field. i tried in my script as follows: file='c:/sample.json' for list in file: if (str(list['Detail'])=='None'): print('Do nothing') else: ana = list['Detail'] val =...
stack learner
2

votes
1

answer
71

views

How do I return a html code as output of filter in Angular js

I have written a custom filter which matches a pattern and if the match is true converts it into html, how do I bind the html output inside {{test | toimgsrc}} I don't want to use ng-bind-html or $sce is there any other way? here is my code angular.module('demoApp', ['toimage']) .controller('MainCo...
Stack learner
18

votes
3

answer
20.2k

views

How to check if a component is mounted in React-Native ES6

I am setting a listener in my application and using force update whenever it is broadcasted but it gives error forceUpdate cant be called on unmounted component. How can I check if a component is mounted now that the isMounted() function is deprecated. 'use strict'; var React = require('react-native...
stack Learner
6

votes
3

answer
2.1k

views

EditText giving error : TextView does not support text selection. Selection cancelled

I have RecyclerView.The element at position is 0 is header for EditText ,then all other elements are images.On long pressing on EditText it gives option paste.This works fine. But when I scroll the recycler view to the bottom and again come to top and long press it will not show the paste option and...
stack Learner
1

votes
4

answer
9.1k

views

How to access the holder element outside view Holder in adapter android?

I have a ViewHolder Class. class VHHeader extends RecyclerView.ViewHolder{ TextView txtTitle; RecyclerView recyclerView; public VHHeader(View itemView) { super(itemView); this.txtTitle = (TextView)itemView.findViewById(R.id.txtHeader); this.recyclerView =(RecyclerView)itemView.findViewById(R.id.recy...
stack Learner
2

votes
1

answer
1k

views

React Native error: expected a string (for built-in components) or a class/function (for composite components) but got: object

This is regarding react-native application android I have FirstScreen.js In that I have implemented navigation drawer. The content on navigation drawer changes on based of certain criteria i have implemented: var Logout= require('./Logout'); Now when from Logout.js i try calling this FirstScreen.js...
stack Learner
2

votes
5

answer
158

views

getLayoutParam returning width as -1

I am trying to set the layout width programatically . ViewTreeObserver vtoRecyclerView = mMainLayout.getViewTreeObserver(); vtoRecyclerView.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { mMainLayout.getViewTreeObserver().removeGloba...
stack Learner
2

votes
2

answer
1.4k

views

RecyclerView moves to top on adding new items to List

I am trying to implement an endless scroll using recycler but when I call notifyDataSetChanged() the whole list refreshes then the scroll position goes back to the top.So I went through many docs mentioned for the same.I am scrolling from top to bottom like in any chatting application. So i check if...
stack Learner
5

votes
1

answer
218

views

Collapsable toolbar not collapsing properly when having recycler view inside it

I have a collapsableToolBar layout.The image inside the tolbar is collapsing and sliding but the items in recycler view are not collapsing, they remain at their position only.I want themto move to top and collapse.
stack Learner
3

votes
1

answer
193

views

How to include Ionic.io services in Ionic 2 beta

ionic.io provides services like User Authentication, Push etc. Using Ionic services with ionic 1 seems to be well documented but for ionic 2 there is no documentation about it anywhere. I am impelementing an app using typescript, so what Should I import? I've already run $ ionic add ionic-platform-w...
Stack learner
2

votes
0

answer
41

views

How to set the solid color and stroke color programatically in Selector Drawable? [duplicate]

This question already has an answer here: I need to change the stroke color to a user defined color. Nothing to do with the state 5 answers How to change shape color dynamically? 11 answers I have a selector I want to set the solid color and stroke color programatically in this selector.How to ach...
stack Learner
5

votes
5

answer
1.8k

views

How to enforce editText not to start with space

I have a edit Text.I don't want the first letter to be space. If user hit the space as first letter cursor should not move.
stack Learner
3

votes
0

answer
22

views

Unable to import the files of napps_sdk.jar in androidstudio

I have added library napps_sdk.jar into my project but i am not able to import any of its files. Downloaded the sdk from https://github.com/onelogin/napps. Copy napps_sdk.jar from napps-master/Android/SDK and add it to the app/libs directory for your app.
stack Learner
0

votes
0

answer
268

views

Support for multiple google-services.json in Flavor based Android Approach

I have an android app with four flavours.Each flavor has his its own google-services.json file. This file needs to be under /app structure.I found this approach to be working in various links: productFlavors{ one{ applicationId 'com.flavor.one' versionName '2.4.3' minSdkVersion 16 targetSdkVersion 2...
stack Learner