Questions tagged [main-activity]

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

201 questions
0
votes
5 answers

What code do I put in manifest android file on launch to have splash screen?

I already looked up similar posts on SO. I have added splash.java class, splash_layout.xml file, i had 2 app icons appearing on desktop emulator and splash was there, but 2 icons is not good I suspect it is about manifest, what do I put in there…
ERJAN
  • 23,696
  • 23
  • 72
  • 146
0
votes
2 answers

How do I add logo on my start screen in android app?

I m making book finder app for the website, i want the logo to be on screen when the user first time launches the app Here is my code for Main Activity onCreate(): protected void onCreate(Bundle savedInstanceState) { …
ERJAN
  • 23,696
  • 23
  • 72
  • 146
0
votes
1 answer

How can I access a setter method of MainActivity class, from a fragment classe?

This is the setter method in MainActivity class public void setNumPlats(int numero){ this.numPlats = numero; } I'm trying to acces to this method from fragment class, but i dont know how i need to do this. In the fragment class i'm trying to do…
user4385866
0
votes
2 answers

apk giving error " unfortunately Helloapp1 stopped "

Whenever i try to make any app even simple hello world app every time i get this type of error, even in android virtual devices and android phone also, so i want to know that what are mistakes that i made every time in made, and can any one please…
shubham
  • 9
  • 5
0
votes
1 answer

Is main activity mainly used as a bridge to separate classes and activities?

Lets say you've made a messaging app. The main activity would present different contacts and give you options for sharing, messaging, voice-calling, etc. Would each of those options have separate classes all stemming from the main activity class…
King
  • 256
  • 1
  • 11
0
votes
0 answers

empty project created on android

i have a problem when i create a new project android i got an empty project without mainAcivity ,Even if i try this solution : (Help" -> "Install new software" and install (this will update it) from this url:…
Amal
  • 1
0
votes
0 answers

how can i appropriately change this error code(audioFx app for Android)?

I'm studying about audio effect(here audiofx for android api), processing audio recording in real-time etc and making a sample application project that can be released. I think I am almost completing my project. I simply referred a application that…
0
votes
2 answers

What does expandablelistview error in AndrioStudio mean?

This is the main-activity where the error occurs public class MainActivity extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // storing string resources into…
0
votes
1 answer

Activity does not restart after orientation change

I'm having a problem with my Android project. I'm creating different layouts for phone and tablet, but having some issues. These layouts use different fragments. This is my MainActivity onCreate method: protected void onCreate(Bundle…
Max Zavernutiy
  • 1,771
  • 1
  • 18
  • 27
0
votes
2 answers

Create New Activity Error: RED SQUIGGLYS EVERYWHERE

So I have been working with Eclipse and Android Application projects for a few months now, and recently, I have had some problems. So to give the full backgroud, I changed the target SDK and API of a project, and downloaded every SDK package…
0
votes
2 answers

Android App quits if you push a button to go back to MainActivity

i started creating a Android App with Android Studio. I created a button (and added android:onClick="page2") in the MainActivity that links to a second Activity with the following code in the MainActivity.java: public void page2 (View view) { …
Jonas D
  • 11
0
votes
1 answer

Hello world android - creation with errors

I'm trying to create my first app with Android but I've encountered some problems. Following a tutorial and making: new android application -> blank activity The default result should be: With MainActivity.java and R.Java inside it. But instead…
Pickeroll
  • 908
  • 2
  • 10
  • 25
0
votes
1 answer

How to get message to send from server to Android

I have made a program to send a message from a client to a server(2 android devices), but the message is not being sent. Here is the code of the client side application: package com.example.clientphone; import java.io.IOException; import…
Atu Kar
  • 3
  • 4
0
votes
0 answers

Animation on Main Activity

I want to make animation on my main activity.. when my app is opened i want to open with animation .. I have posted my main activity code and i want bounce animation while opening my pager xml. import android.app.ActionBar; import…
sureshssk
  • 75
  • 1
  • 2
  • 7
0
votes
3 answers

Problems In MainActivity.java Trying to use ToogleButton

I've a problem with my Android Aplication, what i'm trying to do is that pressing the ToggleButton, the aplication writes in a File Hello every two seconds (What I really wanted is that save in a file the gps position every 2 seconds), the…
david.t_92
  • 1,971
  • 1
  • 11
  • 15