Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
0 answers
6 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
1 answer
44 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 ...
Andro's user avatar
  • 94
2 votes
1 answer
716 views

In Android Studio what is enableEdgeToEdge in activity?

I am still using xml for view but when now I create a new activity it auto fills the enableEdgeToEdge. I am not sure what it is and what's the use of it can I remove it will that affect the activity I ...
Infoneo Android's user avatar
0 votes
2 answers
38 views

How kill previous activities

In my app I have in the mainActivity intent that move mw to the second activity and in the second activity I have also intent that move me to the main activity. Now when I press the back button in my ...
imanuel ben chaim's user avatar
0 votes
0 answers
35 views

Migrating Kotlin Android Studio project from Empty Activity to Empty Views Activity

As I've been working for a while to my current Android project I've managed to do some progress but just realised my actual project doesn't have the layout folder with the main activity in it. After ...
jakeprog123's user avatar
1 vote
0 answers
38 views

Problems while calling the API: The authManager is: null; the authCallback is: null; the mContext is: null

In my project, I want to call a Baidu map API (a Chinese map API), I wrote MapApp.java for this program, initialized the SDK in this file, and also declared it as the entry point of the program in ...
Wei Zeng's user avatar
1 vote
1 answer
32 views

MainActivity created and destroyed then created again on first run by Android Studio

when I run a new app the first time MainActivity is created then destroyed and then created again. This happens only on the first launch after installing from Android studio. MainActivity.kt import ...
Aamir's user avatar
  • 51
0 votes
0 answers
9 views

How to add two activity in android studio using Kotlin? [duplicate]

I have made an app. When i try to go to another activity, the app crashes. But the home page works perfectly. I have checked but i haven't found any problem. I have checked all the files, they are all ...
SD Sojib's user avatar
0 votes
0 answers
23 views

Why can't my activity run when one activity jumps to another activity

In Android one activity to another activity run but i can't watch anything in second activity on device. I tried to change run confirmation and run specific activity but at a time same this problem ...
Raj Rangpariya's user avatar
0 votes
2 answers
47 views

How to remove activities above a certain activity?

The app in our organization operates in KIOSK mode at various sites, beginning with a default activity, the splash screen, featuring an animated logo. Following the splash screen, decisions are made ...
SSF's user avatar
  • 11
0 votes
0 answers
50 views

Why i cant properly read arguments from activity

so im sending to ListFieldsFragment game id from activity, and its working here is code from activity class CreateFieldsActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: ...
Matthew's user avatar
  • 21
0 votes
0 answers
25 views

How to minimise the multiple XML and javascript in Android studio

My goal is to have a single activity that accommodates all the Java logic while maintaining the shared structure. This would not only streamline development but also make future additions more ...
Quantam's user avatar
0 votes
1 answer
948 views

Jetpack Compose share Viewmodel between Activity and Composables

I have followed this tutorial to get the basic regarding ViewModel and Jetpack Compose: https://developer.android.com/codelabs/basic-android-kotlin-compose-viewmodel-and-state#0 In the above tutorial, ...
soyxan's user avatar
  • 81
-1 votes
1 answer
36 views

How to Call properly Fragment from MainActivity?

I have Fragment which i call from the MainActivity Class :-) . Here is the fragment code : public class PersonFragment extends Fragment { private static final String ARG_NAME = "name"; ...
Antonely93's user avatar
0 votes
0 answers
11 views

Google map activity not found

When I open Android studio and creating new project, when I can't find googleMapsActivity. Only I found 4-5 basic activities like EmptyViewActivity, ResponsiveActivity, C++ activity... Please help me ...
RITIK KUMAWAT's user avatar

15 30 50 per page
1
2 3 4 5
66