Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

How to let viewmodel initiate a background task

I have a queue that needs to execute tasks. There are two types of tasks: fragment work and background work. But I want to put all the work codes in the viewmodel for unified management. How should I ...
乐于助人的王老师's user avatar
0 votes
1 answer
24 views

Send Data Fom Fragment to Activity Kotlin

I am building a calculator application in which buttons section is inside fragment (fragment belongs to main_activity only) and result textview is in main_activity. Now can anyone tell a simple ...
user3047858's user avatar
-1 votes
0 answers
14 views

Assistance Needed for Overall Layout in a Frontend/ReactJS Project

I have a question about using ReactJS with CSS modules for my front-end project. I want to set up the overall layout, but I understand that CSS modules are scoped only to the components they are ...
Tú Trương's user avatar
0 votes
0 answers
15 views

Age from one fragment extracted using edit text saved in datastore not showing in another fragment using text view in kotlin android studio

I am using edit text to get username and age from one fragment. These details are saved in Datastore class in kotlin. When I want to display username and age to the next fragment. It is only the ...
Thandeka Zulu's user avatar
0 votes
1 answer
20 views

Liferay 7.4 Anchor Menu with Fragments [closed]

I'm working on Liferay 7.4 CE and I have a page with a grid of 2 boxes. I need to create a menu in the left box that works as an anchor to the content of the right box. In the right box the content is ...
Salvador Cruzh's user avatar
0 votes
1 answer
41 views

fragment shader invocation

I control the number of fragment shader invocations where VkPipelineInputAssemblyStateCreateInfo.topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST to 9 invocations by setting gl_PointSize to 3. I ideally ...
user23073100's user avatar
0 votes
0 answers
17 views

Fragment view is re-creating every time in BottomNavBar

In my android app I'm using bottomNavBar with 3 items, [Home,Dashboard,Notification] those are fragments. whenever Im clicking Home or Dashboard fragment view with viewModel also is re-creating. to ...
misterios's user avatar
  • 334
0 votes
0 answers
16 views

How to lauch an android app from specific Fragment (activity)

I am doing automation testing of app using appium. And i need to launch app on specific page (activity) but in my project there is only one RootActivity. When I use this code on it works well but only ...
Akdil Toktosun uulu's user avatar
0 votes
0 answers
13 views

Eclipse fragment project localization failed

I have created a eclipse fragment project.The host plugin is org.eclipse.ui,the fragment folder like this: com.cqyt.ide.nl META-INF MANIFEST.MF build.properties plugin_zh.properties The ...
wzj7531's user avatar
  • 37
0 votes
0 answers
39 views

Why does adding WindowCompat.setDecorFitsSystemWindows(window, false) in MainActivity cause TextView to disappear in Android?

I'm working on an Android application and encountered an issue when adding `WindowCompat.setDecorFitsSystemWindows(window, false)` in the `MainActivity`. **Problem**: When I add this line in `onCreate`...
Nitin Patil's user avatar
0 votes
1 answer
46 views

How to pass data from recyclerview adapter to a fragment?

I am trying to pass a data from my adapter when clicked in recycler view to a fragment. i have implemented the click listener but can't pass data to the fragment and also get the passed data inside ...
18.5's user avatar
  • 31
0 votes
0 answers
9 views

How can Managing Multiple Layouts in a Single Activity on Android Studio

I'm trying to develop a quiz game where you have to guess all the members of a football team. In short, the formation opens and the user enters a new activity (with a new layout) through an ...
Italiana Computer's user avatar
0 votes
0 answers
15 views

I am retrieving a food item from cloud and display in my cart fragment but it does not show up

I am making an food ordering app where the food item added to the cart from the menu is stored in cloud and is then retrieved by the cart fragment but the code seems fine but item does not show up in ...
Om Pal's user avatar
  • 11
0 votes
1 answer
31 views

Problems displaying pivot charts in E4 RCP

here is the application.e4xmi: This is how the Perspective looks when start: In Open Perspective Dialog: So Strange The display is normal when using extension point definitions, but incorrect when ...
user10910393's user avatar
0 votes
0 answers
34 views

Error :- InvocationTargetException , FileNotFoundException: contents.json, Fragment, Kotlin

I got These Errors FATAL EXCEPTION: main Process: com.example.mykotlinapp, PID: 19988 java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.android.internal.os.RuntimeInit$...
Anoop Moji's user avatar
0 votes
1 answer
28 views

Error :- lateinit property itemsList (ArrayList) has not been initialized, HomeFragment, Kotlin

I am trying to create a story Book app with Kotlin but I am beginner and learning programing. and I try to create this app with local Json file (loadJsonFromAssets) with glide, in home fragment, but I ...
Anoop Moji's user avatar
0 votes
0 answers
9 views

SettingActivty.java cannot attach the BottomNaviagtonView

Any Android guru here, please advise as i have recently learned Android. Just create a SettingActivity.java together with the Preference.xml in which resides under the xml folder. Below is my very ...
mylottofinder.com.au's user avatar
0 votes
1 answer
138 views

Kotlin android.content.res.Resources$NotFoundException: Resource ID #0x7f07006e

Issue occured when right after attempting to "register", the kotlin app would crash,Suspect that it can't find or read the image on the drawable folder. I tried to rename the images but the ...
BRSV's user avatar
  • 1
0 votes
0 answers
15 views

ViewPager2 with reordering logic for next fragment always being to the left or to the right

Is there any possibility to make viewPager2 with disabled userInput viewPager.setUserInputEnabled(false); and control pages reordering in the way of substitution fragments always to the left or to ...
Alexandr Petrov's user avatar
0 votes
0 answers
7 views

How to use UserSingleton in Fragment

When I Login at LoginActivity, I save the user data returned from the user into UserSingleton and transfer it to MainActivity as follows: enter image description here But why when I use it in ...
Nhật Minh Hoàng Nguyễn's user avatar
0 votes
0 answers
30 views

Cannot load fragments inside Framelayout

it's my first time asking for help on the Internet, usually I find what I'm looking for on the Net or I find the solution by myself but in this case I really don't know why it doesnt work. Let me ...
Noctis's user avatar
  • 1
0 votes
1 answer
30 views

RecyclerView loads indefinitely when moved to a ListFragment

I've followed this tutorial: https://developer.android.com/codelabs/android-room-with-a-view-kotlin. Code works flawlessy, but I wanted to move the RecyclerView to a Fragment. Now the list loads ...
mahor's user avatar
  • 1
0 votes
0 answers
144 views

I am getting this error java.lang.IllegalArgumentException - Provided camera selector unable to resolve a camera for the given use case

I am attaching the code below. I am inverting an camera on click of a button starting the camera on view created of an fragment and click image on click of a button. //used for inverting the camera. ...
Sunny Gahlot's user avatar
0 votes
0 answers
31 views

How do I keep my fragment in Android Studio from being transparent?

Rewrite this so it's appropriate for StackOverflow. As in all the code blocks will have 4 spaces in each line So I have a fragment in my app and when I click on the button that takes me to it, it ...
JosephFC97's user avatar
0 votes
0 answers
21 views

Lỗi không hiển thị được layout viewPager

enter image description here Mình đã kiểm tra lại đoạn mã và không tìm thấy lỗi nằm ở đâu, màn hình cũng không thông báo lỗi Mình thực hiện theo kênh youtube này https://www.youtube.com/watch?v=...
Mimi's user avatar
  • 1
0 votes
1 answer
18 views

Layout Inflater Fragment to View how(to) or when does the associated Java file get called?

I created a secondary Activity and also a new Fragment via the menu options. I'm calling LayoutInflater inf = getLayoutInflater() inf.inflate(R.layout.fragment_reuse_view,this.findViewById(R.id....
Stewart Peters's user avatar
0 votes
0 answers
22 views

Android navigate to child fragment programmatically without instantiating root fragment - nav graphs

I am seeking help with android nav-graph and navigation component, I have HomeActivity with NavHostFragment, I am looking for a solution where, HomeActivity checks for certain condition and navigate ...
Vishal's user avatar
  • 1
0 votes
0 answers
27 views

Fragment navigation issue in addToBackStack

In Activity oncreate // oncreate FragmentHealthReadingKt readingFragment; Logger.debug(TAG, "#2 reading Fragment created !!! "); readingFragment = ...
Krishna Dhas's user avatar
0 votes
2 answers
120 views

ViewModel initialisation when the factory is no longer there

I am creating a minimal ViewModel in my MainActivity, using the by viewModels mechanism. It currently just maintains a repository, by Dependency Injection. This requires construction parameters, so I ...
fiatCurrency's user avatar
0 votes
0 answers
26 views

java.lang.RuntimeException: Unable to start activity: Error inflating class fragment

The error I'm encountering when I start my app, after splash screen, it crashes with this error in logcat: FATAL EXCEPTION: main Process: com.tapz.app, PID: 27735 java.lang....
Sahar Batool's user avatar
0 votes
0 answers
20 views

How do I fix fragment overlaping with main_activity fragment in Kotlin

So I have a layout\activity_main.xml file that appears on screen as soon as the user launches the app. I then have fragment called fragment1.xml. In my activity_main.xml I have a settings button that ...
JosephFC97's user avatar
0 votes
0 answers
35 views

Impossible to change a fragment's TextView

I'm a total beginner in Java and XML, and I started after watching some tutorials to create my own calendar app. This app has a calendar fragment that contains a TextView that shows "Welcome back ...
Stotox's user avatar
  • 1
0 votes
0 answers
16 views

when clicking on the note in my app it doesnt open and doesnt throw an error code

in my app there's an area where you can create notes of different equipment you input but after creating the note, when I click on it to edit it doesn't open at all. I want it to be where I can be ...
DCam's user avatar
  • 31
0 votes
1 answer
59 views

Material date picker not showing

I am using material date picker in my andorid project in fragment. On specific click, I want to show user the date dialog but on click nothing is showing. Here is my code: I am expecting that user ...
Ayush's user avatar
  • 23
0 votes
1 answer
41 views

Using bcosca/fat-free framework with HTMX: Is there a way to render a template fragment?

I am aware of using INCLUDE to break a template into fragments that can be reused in multiple ways but this leads to many separate files that can become difficult to name and manage consistently. I am ...
meljturner's user avatar
0 votes
0 answers
21 views

Animation onAnimationEnd not called when Fragment onPause

val rotate = RotateAnimation( degreeOld, degree, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f).also { it.duration = animationDuration it.fillAfter = ...
GHH's user avatar
  • 1,969
0 votes
2 answers
76 views

I have an error about switching between fragments

So I have a fragment that contains CameraX. I want to move the photos to the fragment that contains ImageView. When I press the button for photos on the Camera Fragment binding.ivCamCapture....
Raidra Zeniananto's user avatar
0 votes
1 answer
98 views

MenuProvider: What is the equivalent of invalidateOptionsMenu?

What is the equivalent of requireActivity().invalidateOptionsMenu() in a fragment when using the new MenuProvider API? When I get some new information at runtime, I need to refresh the menu in my ...
VIN's user avatar
  • 6,856
0 votes
1 answer
147 views

Keep activity in immersive mode

I am encountering difficulty maintaining immersive mode throughout my activity. I have an activity consisting of various fragments. Within the initial (main) fragment, screen rotation is enabled. ...
Mr T's user avatar
  • 53
0 votes
1 answer
103 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 ...
Jason W's user avatar
  • 117
0 votes
0 answers
45 views

Access button in MainActivity from fragment

I have 5 destinations in my app in order to make easy for the user to navigate between them, I have had used bottom navigation and fragment. All may destinations have a common floating action button, ...
khalid morrshid's user avatar
0 votes
1 answer
43 views

Fragment upon fragment

I want add fragment B upon to fragment A. How can I do it? This is my first fragment: This is my 2nd fragment on top of the 1st fragment with transparent: How can I write it with code? Plas write ...
Rufat Shikhiyev's user avatar
0 votes
0 answers
24 views

Second level child fragment hides the parent fragment

I have a main activity with a nav host fragment and four fragments. One of the four is the root of the navigation tree, the three others are children fragments. This works fine. Now I want to add an ...
Simon W's user avatar
  • 33
0 votes
0 answers
30 views

Open bottomsheetdialogfragment Via Interface callback inside library

What I have? One library that contains activity One fragment (get a callback from the library's activity) Now on the library's activity button click to get a callback from fragment in this case my ...
Akshay Vadchhak's user avatar
0 votes
0 answers
14 views

select on table dbroom doesn't read item previously inserted in table

I'm trying to read all the occurs of a table from a Fragment, after an insert. The query read all occurs except the last record previosly inserted . The insert was in one fragment, the select was in ...
AleBra's user avatar
  • 1
-3 votes
3 answers
64 views

How can I use value in Fragment from parent Activity or other Activities?

I'm trying to deliver value in Fragment to its parent Activity (Parent Activity means Fragment's Parent Activity: Fragment is in Parent Activity) I know I can use ShareViewModel, but I want to know ...
JUNYONG's user avatar
0 votes
1 answer
40 views

How to enable/disable fragment button, within main activity in Kotlin

There are several answers to questions similar to this one, but none in Kotlin. I have a main activity with a button and two fragments. In the first fragment there is a navigation button that launches ...
Simon W's user avatar
  • 33
0 votes
0 answers
5 views

I can't change the text in the TextView (kotlin)

override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { // Inflate the layout for this fragment val view =...
Tiziano Pietrella's user avatar
1 vote
0 answers
65 views

ViewModel function implementation with MutableLiveData or use directly a LiveData?

I have a function getAdressSuggestions who return a list of AddressResult I wonder what is the best implementation between this two : The first one is with a MutableLiveData we have inside the ...
Vodet's user avatar
  • 1,510
0 votes
0 answers
53 views

Unable to start activity befor dagger hilt injection

I have some injections in viewModels (like room) without problem Now i'm trying to inject into my fragment but the app crash. Fragment: @AndroidEntryPoint class ContactListFragment @Inject constructor(...
Electrocode's user avatar

1
2 3 4 5
163