Quantcast
Channel: User rookieDeveloper - Stack Overflow
Browsing index pages (37 articles)
↧

Answer by rookieDeveloper for How to check permission in fragment

I have done following to check a permission inside a fragment.if (ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED...

View Article


firebase on Data Change is called multiple times in add value event listener

I have set two listeners Query to get the last messageIf the last message is group type I'm getting group info using group ListenerHowever, when I get the type from the message using messageListener...

View Article


onclick using databinding in fragment

I am trying to implement data binding in a Fragment but it's not working, the same code is working in Activity.Fragment class final FragmentHomeBinding fragmentHomeBinding = DataBindingUtil.inflate(...

View Article

Answer by rookieDeveloper for How to get Vendor ID of an Android-powered...

if you want to get in your android application you can use following code UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE); HashMap<String, UsbDevice> deviceList =...

View Article

Image may be NSFW.
Clik here to view.

Draw a view in canvas

I have a viewpager with multiple pages. I have to show the selector yellow circle. Is it possible to draw the complete view using canvas?

View Article


Answer by rookieDeveloper for Failed to resolve: :truesdk-0.7-releasePartner

I hope this helps someone, as other answers provided here did not work for meGo to File->New->New ModuleSelect the "Import .JAR/.AAR Package" item and click next buttongo to Project Structure...

View Article

searchview issue in a specific device androidx

I have moved my code to androidx it is working fine in other devices but I'm getting java.lang.NullPointerException: Attempt to invoke virtual method 'void...

View Article

Answer by rookieDeveloper for searchview issue in a specific device androidx

as based on the few suggestions in the comment and I wasn't able to find any concrete answer I did following to resolve the problem first I changed menu from androidx.appcompat.widget.SearchView to...

View Article


Answer by rookieDeveloper for Parse JSON data in android retrofit2

@SerializedName("attributes") String attributes;you are using String it should be a class with public class Attributes { @SerializedName("name") @Expose private String name;...

View Article


Get latitude and longitude on click of Marker

I am getting lat/lng: (19.1972,72.93) in my String using String position=String.valueOf(marker.getPosition());how to get only latitude and longitude, I don't want to use splitThanks in advance!

View Article

Image may be NSFW.
Clik here to view.

Disable Checkbox items in alertDialog

I am giving array to select multiple options through alert dialog I want to disable selection if array is fullI have been able to stop adding items to array after it reaches the limit but not able to...

View Article

Answer by rookieDeveloper for android studio platform-tools missing adb.exe

I am writing the solution which worked for me:go to SDK Platform Tools;download SDK Platform-Tools for Windows;extract zip file and copy to \AppData\Local\Android\sdk\platform-tools.

View Article

ClassCastException: android.support.v7.widget.LinearLayoutCompat$LayoutParams...

I have created an alert dialog with custom layout, it is working fine but when I try to set the single choice item to alertDialogBuilder it gives ClassCastException:...

View Article


TransformException duplicate entry for...

I am getting this errorError:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate...

View Article

Store string of array from json response in realm

This is my JSON response which I need to store in realm.{"account": {"_id": "xx123","user_id": "abc999","accounts": [ {"email": "random12@gmail.com","email_platform": ["email" ] } ] }}As we can not...

View Article


Answer by rookieDeveloper for Import Java class from Firebase

You can try following method to retrieve your class' object Map<String, Object> eventMap;for(DataSnapshot da :dataSnapshot.getChildren()){ if (da.getValue() instanceof Map) { eventMap =...

View Article

offline chat storage using sqlite

I have created a chat app using firebase, I want to store the chat data in the user device and show to the user if the internet is not available. I am torn between how to implement it I wanted to use...

View Article


Answer by rookieDeveloper for Evenly spacing views using ConstraintLayout

Well if it helps someonethe key is here app:layout_constraintHorizontal_weight="1" andthe best thing about constraint layout is that it supports circular dependency and here this is what I have done...

View Article

Answer by rookieDeveloper for All com.android.support libraries must use the...

you can add compile 'com.android.support:customtabs:25.2.0'and by right clicking in gradle dependency you can add the conflicting dependencies.for me it wascompile...

View Article

handle timeout exception in loopj

I am having error in handling the timeout exception in asynchttpclient@Overridepublic void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { closeProgressDialog();...

View Article
Browsing index pages (37 articles)


Latest Images