皇冠hg0088代理网址

Questions tagged [android-fragments]

Fragments represent reusable behaviors or portions of the user interface in an Android app.

Filter by
Sorted by
Tagged with
-1
votes
1answer
7 views

How to switch between fragments in android like drawer menu without FrameLayout?

In Android Studio 4, Create a project with Navigation Drawer Activity template and want to put a button to change fragment programmatically. After some researching I found that there should be a ...
0
votes
1answer
20 views

Navigation Component: Navigate from Fragment in Viewpager to another Fragment

I have a Fragment A which navigates to Fragment B Fragment B hosts a ViewPager2. ViewPager2 has two fragments inflated in it - Fragment C and Fragment D. On clicking an item in Fragment C I want to ...
0
votes
2answers
13 views

lateinit property remindersViewModel has not been initialized

I am displaying two fragments in the activity with recyclerViews. I am trying to add a new item to the recycler view but I am getting : "lateinit property remindersViewModel has not been ...
0
votes
0answers
10 views

Changing Toolbar font and layout to have Text below the icon

I've got a fragment which contains some toolbar icons and my activity does so as well. They are supposed to both be there, so I don't want to clear the menu when I open the fragment. This is my ...
0
votes
2answers
29 views

Share and accessing radio button text value between two kotlin files

I have an application that starts with 2 radio buttons. When l click in one of them I can recuperate its text value in the current file. But when i try to access this value in another file it does not ...
0
votes
1answer
22 views

progress bar is not hiding is when the data is loaded in recyclerview in fragments

I created an interface and extended to the class class MoviesandTv(override var mprogressdialog: Dialog) : Fragment() , CDialogs { override fun onCreateView(inflater: LayoutInflater, container: ...
0
votes
0answers
14 views

Custom Landscape Layout (Master->Detail) when using Jetpack Navigation

I'm trying to create a Master-Detail app that should only show MasterView and DetailView next to eachother when the phone is in landscape mode: [Master][Detail] If the phone is in portrait mode, only ...
1
vote
0answers
31 views

Is there an alternative to Fragments to build reuseable components in Android Studio

I am building an application using Android Studio for an android tablet. I am fairly new, have never published an application. I have several parts I use on more then one page so I implemented them ...
0
votes
0answers
6 views

How to make Browser's new tab feature in android app

Hello everyone I m building an android browser app with webview.. I'm stuck at new tab and tab switch features that are present in every browser, can anyone tell me how can i load my WebViewActivity ...
0
votes
0answers
17 views

How to save a specific fragment state depending on which fragment I navigate to next?

Is it possible to save certain states depending on which fragment I go to next? For example if I am in a Graph Fragment, I am calling the onSaveInstanceState(outState) code shown below. If I go to a ...
1
vote
0answers
33 views

Why a new instance of ViewModel is created after navigation back?

I'm currently developing an Android application based on MVVM, so I'm using the ViewModel principle to contain my UI data. I also know that a ViewModel is linked to its owner and that it was destroyed ...
0
votes
0answers
14 views

Problem with Searchview inside Fragment (Kotlin)

Hello guys i have encountered a problem in my app i am trying to use SearchView on a toolbar in my fragment but i cant figure out 2 things first of all why when im inflating the menu through ...
1
vote
1answer
34 views

ViewPager2 doesn't show correct Fragment on slow devices or when debugging

I'm using ViewPager2 with TabLayout and FragmentStateAdapter to display Fragments in tabs. I found out that when I run it on slower devices (ie. Nexus 5X) or when I put a breakpoint to createFragment()...
0
votes
0answers
16 views

recycleView not showing into fragments android

i'm facing a problem with my android project. i'm changed match_parent, fill_parent, wrap_content but not solving my issue. my recycleView is not showing, can you please take a look my code and let me ...
0
votes
0answers
14 views

How to save and restore instances for nested fragments properly?

I have an activity which is using a nested fragment. I can see many crashes from customers where I access my variables first time because they are still null. I think it is related to activities and/...

15 30 50 per page
1
2 3 4 5
2871