2,099 questions
1 vote
1 answer
48 views
Facing an exception when closing a Fragment using android kotlin
I have a main activity, in that I have a fragment layout. Based on the condition, I would like to show the corresponding fragment. So, From the main activity, I am calling a class where I am doing ...
0 votes
1 answer
78 views
How to access the fragments button from hosting activity in android?
I have few fragments hosted by an acticity, i want to access specific fragments' button on the fragment view from the hosting activity from the fragment i can access activitie's button like this ...
0 votes
1 answer
159 views
Can I launch Play Store Review Flow from a Fragment?
I'm reworking my app and in my new app flow the best place to call for a Google Play Store review is in a fragment. Before I was able to launch the review code with no problems when it was in an ...
0 votes
2 answers
374 views
Hiding menu from toolbar on a specific fragment within the same activity
I have an activity that hosts few fragments. Once the first fragment comes to the activity, it inflates some menu (actually just one action button) on AppBar layout of the activity: override fun ...
2 votes
1 answer
289 views
BottomNavigationView height issue when changing status bar transparency in Android app material 3
I'm working on an Android app where I want to change the status bar transparency in a DetailFragment. I've implemented a function transparentStatusBar to achieve this. When I call transparentStatusBar(...
0 votes
1 answer
30 views
Back to last fragment error since no addToBackStack Kotlin
sorry for my bad english I just update my gradle version and all my navigation become buggy, but I still not sure that this is the reason my navigation become buggy. this is my fragment handler on ...
0 votes
1 answer
38 views
Change Activity to Fragment
I started a project using Activity however now I need it to be a Fragment because I want to use a Bottom Navigation Bar. How do I go about doing this? I'm new to Android development and I'm stuck. Any ...
0 votes
1 answer
253 views
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.AtMainActivity.displayCreateCategoryDialog
I wrote the code for alert dialog for the event listener of the floating button but whenever i click on the floating button it always shows this error. My MainActivity.java is as: ```package com....
1 vote
2 answers
461 views
How do I safely re-create my activity when I switch between dark and light mode when using Fragment dialog?
I have a dialog fragment that displays an image whose bytecode is passed to the constructor. When the dialog is appeared and I am in dark mode and try to change the mode to light one and I come back ...
0 votes
2 answers
512 views
How do I keep getting empty response
i was trying to get response through my api, but i always getting empty response, but i get the right request though. idk if this was a misscalled path or what this is my data class: data class ...
0 votes
0 answers
47 views
SavedInstanceState of the MainActivity is null when click back button on the top left of the SecondActivity
I am developing a new app for practical on Android fundamentals 02.2: Android fundamentals 02.2: Activity lifecycle and state please slide to the bottom of the webpage, where is the project that the ...
0 votes
0 answers
405 views
Android WebView Model loads white page when I click link on first webpage that takes me to second page. second page contains html, css, javascript
Jenna here, I've looked for the past month all over and still can't find answer to this. I've looked through ever question here on stack overflow. if anyone can please help. I honestly can't find a ...
1 vote
1 answer
72 views
How to exit a fragment to an activity?
My app starts with 2 activity, login and registration, after login I use: private void abrirHome() { Intent i = new Intent(LoginActivity.this, MainActivity.class); startActivity(i); } After ...
0 votes
1 answer
69 views
How to update activity content automatically when an item is selected in bottom sheet
I am trying to make an unit convertor when i change unit the result is not gating updated as showen in image When i select unit any unit from menu the conversion must be visable on textview here is ...
0 votes
0 answers
205 views
Should login and registration fragments and fragments when the user is logged in share the same activity?
I've got login fragments structure done, it looks like this: LoginActivity: SignInFragment SignUpFragment Now I want to program the fragments that user can see after they sign in. Let's say ...