I’m trying to sort and display data from Firebase using orderByChild() and used: I kept on wondering why it’s not sorting until I realized that childEventListener was used in the documentation. It should’ve been: What is the difference between the two and addValueEventListener when it comes …
Tag: android
Action bar content is not hiding
so i want to use toolbar but when i change DarkActionBar to NoActionBar in the styles,action bar doesnt remove completely and app title is on my toolbar. https://i.stack.imgur.com/0X722.jpg here is my xml code: what can i do? Answer i think you have in MainActivity code like this and you got the result as sho…
how to pass variables between three different methods in java
hello I need to pass value from method A() to Method C() then after call Method C() inside the method B(). please any one show me the syntax. for example: I need this payerPhone the next follow method called onActivityResult() Answer Firstly I strongly recommend you to gain some teoretical knowledge about jav…
The code is constantly crashing (android studio, java language)
Errors: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.myapplication, PID: 8501 android.content.res.Resources$NotFoundException: Resource ID #0x7f070058 at android.content.res.Resources.getValue(Resources.java:1266) at androidx.appcompat.widget.ResourceManagerInternal.loadDrawableFromDelegates(R…
How can I change the width of an image button in a horizontal scroll view?
I’m trying to create a page that looks like the contribution page of GitHub (like each square represents a day, and the transparency of the square represents the number of commits). I want the page to look something like this: So, I made a horizontal scroll view because I want the section of squares can…
The register button is giving me authentication failed, how can i fix it?
The register button is not functioning correctly, It gives me authentication failed toast. it seems like my strings for a create a user with email and password are correct but it still wont work. What can I do? please help if you can. Java File: XML File: the strings I filled in: [enter image description here…
Cannot change the colour of the button of my android application in Android studio
I’m new to android studio. I started to create a mobile application. I need to add a white color button to my mobile application. I just drag and drop a button and it shows as blue color in the Android studio design as well as in my phone. After I created a button.xml to change the color of the button.
How to get method name in android (java)
I want to retrieve the method name on an android app for logging purposes but can’t seem to get it. I’ve already tried doing what was suggested in other answers, such as: Thread.currentThread().getStackTrace(); and new Object(){}.getClass().getEnclosingMethod().getName(); To no avail, the first re…
Launching a transparent activity on HomeScreen
So there is an activity containing a webview. On launch/click on App Icon it should launch activity with webview as dialog on the HomeScreen of the device. Is there a way to achieve this? Answer Yes, you can do it. Set the theme of MainActivity to Dialog, then you’ll achieve it. It works fine for me. Ho…
Out of order BufferInfo.presentationTimeUs timestamps in mediacodec decoder
I am getting irregular newBufferInfo.presentationTimeUs because of which if I put Thread.sleep to slow down the playback, a lot of frames are dropped. Actually, with Surface the frames timestamps are synchronized automatically with system timestamp without sleep, however it does not work with giving output to…