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 to using orderByChild or any sorting method? Does get() not follow orderByChild()? Answer All
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 shown in the screenshot just remove this
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 java (follow some tutorials, read documentation etc) As
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(ResourceManagerInternal.java:255) at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:142) at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:135) at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104) at androidx.appcompat.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:505) at androidx.appcompat.view.menu.ListMenuItemView.initialize(ListMenuItemView.java:131) at androidx.appcompat.view.menu.MenuAdapter.getView(MenuAdapter.java:109) at androidx.appcompat.view.menu.MenuPopup.measureIndividualMenuWidth(MenuPopup.java:161) at androidx.appcompat.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:174) at androidx.appcompat.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:208) at androidx.appcompat.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:296) at androidx.appcompat.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:182) at androidx.appcompat.widget.ActionMenuPresenter$OpenOverflowRunnable.run(ActionMenuPresenter.java:792) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) FirstScreenActivity: SecondScreenActivity:
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 be scrolled horizontally. And I
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][1] [1]: https://i.stack.imgur.com/2d29O.png Answer When
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 returns me a stack with something like: The second returns “a” as the method name. Does anyone know another
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. Hope it can help
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 OpenGLES. https://developer.android.com/reference/android/media/MediaCodec#releaseOutputBuffer(int,%20long) I thought mExtractor.getSampleTime() is the problem but even after removing it, the