Questions tagged [main-activity]

The main activity is the one which starts before the other ones.

201 questions
1
vote
0 answers

Why does the app icon not show up in Android if the MainActivity is not set as the LAUNCHER?

When I install the application on my phone , if I do not put the Main Activity as the LAUNCHER, then the application does not show up on my Home Screen.
Roshan Vincent
  • 89
  • 1
  • 12
1
vote
1 answer

How do I add my Expandablelistview to my main activity?

This is my EXPlistview : public class ExpandableList extends MainActivity { private LinkedHashMap subjects = new LinkedHashMap(); private ArrayList deptList = new ArrayList(); …
1
vote
0 answers

Arranging categories with sub-categories correctly in Android app?

I am developing an Android app, which has around 6 categories. Every category, has 3 sub-categories each, with same name. So, how can I arrange the categories in a way, to save long lines of codes. That means less number of activities. Here, I am…
1
vote
3 answers

Does the Intents get killed after i pass to another Intent Android

I'm working on an android application and in the application I have a couple buttons that let user to pass to another activity. Now the way I'm doing the transitions between this Intents is like below: Intent intent = new…
Ahmet Urun
  • 169
  • 3
  • 18
1
vote
2 answers

invoke MainActivity after splashscreen

Calling the MainActivity.java after SplashScreen? The code compiles correctly , but does not invoke the Main after the Splash in any way , it simply closes . In AndroidManifest.xml calling SplashScreen and not MainActivity , make a…
Paulo Roberto
  • 1,498
  • 5
  • 19
  • 42
1
vote
1 answer

Cannot resolve method and LinearLayout

I'm having problems with my code... Before, it worked, then I added some simple lines in the layout and now I have lots of erros. I'm trying to learn by myself how to do an app for my schools libray so I'm no pro. Thanks for any help. The error here…
1
vote
2 answers

How to remove Android ExceptionInitializeError?

I am getting the following error in my logcat: 03-28 15:07:12.758 27708-27708/in.aekansh.cortibae E/AndroidRuntime: FATAL EXCEPTION: main 03-28 15:07:12.758 27708-27708/in.aekansh.cortibae E/AndroidRuntime: Process: in.aekansh.cortibae, PID:…
Aekansh Dixit
  • 513
  • 1
  • 9
  • 20
1
vote
1 answer

splash wouldn't go to the main activity

Splash.java public class Splash extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); final ImageView iv =…
EverBloom
  • 21
  • 4
1
vote
0 answers

Android - Can not cast called activity from fragment

I'm developing android music player and its my first app but there is something wrong in my code hence getting MainActivity(fragment tabs,ViewPager,naginational drawer code) can not cast PlayerActivity(music player ui,playing related stuff…
Coolalien
  • 49
  • 1
  • 1
  • 7
1
vote
2 answers

How to make a fragment open by default in Android? How to sign button which is clicked?

I'm making football application and it has 4 buttons on the top side of the screen. Every button will open different fragment. Now when I open the app by default it's showing 4 buttons and empty field under them where will be shown content of…
Yusuf
  • 145
  • 6
  • 12
1
vote
3 answers

Android: Navigation drawer menu on any activities

I made a left menu, using ExpandableListView, this one works very well on my MainActivity. Now I want to use it on my other activities, how can I do this simply? Should I just create a class for the menu or can I re-use my MainActivity? Here is the…
1
vote
1 answer

Cant remove Title Bar Android app

Have big problem removing the Title Bar with Settings button. When i try to remove it with code : android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> or similary i get App crash. Application consists of Splash screen, and Web View…
1
vote
3 answers

Android ClassNotFoundException for main activity

I can't get my app to launch because it can't find my MainActivity, even though I have the proper .java file and I declared in my manifest, as you can see below:
rakeshdas
  • 2,363
  • 5
  • 20
  • 28
1
vote
0 answers

Android main menu

I am working on an android project, and have created a splashscreen that is functional. When the splash activity is done, it moves on to my main activity. my question is, should my main menu of the app be created on the main activity? I have been…
PuchuKing33
  • 381
  • 3
  • 7
  • 19
1
vote
2 answers

MainActivity starts before SplashScreen ends

I have a SplashScreen activity at my android app that lasts for 3 seconds, and then it switches to MainActivity. MainActivity plays a sound, and it has a button. My problem is that the sound plays when the SplashScreen activity is visible. onResume…