Questions tagged [main-activity]

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

201 questions
0
votes
2 answers

Start fresh with running OnCreate of the MainActivity

I read many threads about this subject, but I couldn't find anything that fits my needs. I have an application with 3 activities (I'll call them screens here, more intuitive): A (MainActivity), B and C. Screen A starts another process, retrieves…
Augustina
  • 259
  • 1
  • 4
  • 15
0
votes
1 answer

Android - open url in my app when my app is already opened

I'm trying to open a specific url with my app instead of browser. I have it working correctly except if my app is already open, the url doesn't open to the page specified. My manifest file is as follows:
Marcia H
  • 3
  • 3
0
votes
1 answer

How to remove the fragments so it wont appear in the next activity?

So i've just started doing some android programing, and I'm already stuck! My problem is; I want want my fragment, from MainActivity, to NOT be a part of my new Activity. I want the activity to be all blank, the fragment from MainActivity should be…
0
votes
1 answer

Button Click - Copy file from APK Package to Android Path. But How?

Im trying to create a simple application which will copy a file from "assets" folder of the APK Package to (e.g. mnt/sdcard/android/data/com.testdev.testapp when button1 get clicked. But i don't know how to do this. Is this even Possible or are…
Rajat
  • 47
  • 2
  • 9
0
votes
0 answers

android-How to return to same activity after search is done in a single activity

I have implemented my search widget in the Main Activity.. And my MainActivity is handling all the searching feature.. When the query is executed the results are come up as per desired.. But the real problem is while the search query result are…
user3794646
  • 23
  • 1
  • 10
0
votes
1 answer

Unable to Load Fragment from Main Activity

I am trying to load a frame on the Onclicklistener of a Button in the main activity. In my view I have written all the code correctly of main activity and fragment that requires to attach a fragment to activity. But something seems off. Appreciate…
Akshay
  • 806
  • 11
  • 26
0
votes
2 answers

Eclipse: Issues with deleting and creating projects

I am having an issue in Eclipse. If I create a project, then delete it and check the "Delete project contents on disk (cannot be undone)" check box, a project created afterwards with the exact same name and settings will not be created with a…
Zach H
  • 257
  • 1
  • 3
  • 15
0
votes
2 answers

Android application with only one Activity

Is it bad programming if I use only one Activity for a game like pong? I have different classes to do different tasks and handle touches etc. but I only have one main Activity which changes what is drawn on screen based on user input. I currently…
Sam Javed
  • 115
  • 2
  • 2
  • 9
0
votes
2 answers

Where to write the order to run the program in android?

I was asked where to write the order to run the android program. Is it Main Activity or Manifest? . We start in main activity and run accordingly . Someone said it is manifest where we right the order of running of the program. what is the correct…
user260203
  • 11
  • 7
0
votes
1 answer

Android main activity is visible in the background of another activity. I want it removed

this is my first time posting a question here and so please, pardon my mistakes. I am currently working on an Android app and I am fairly new to it. In my main activity, I have a image background and three buttons. The third button's action listener…
user3643556
  • 17
  • 1
  • 6
0
votes
1 answer

No enclosing instance of the type MainActivity is accessible in scope at MainActivity.this

I am making an app with a ListView. That ListView needs a separate class where you can set the action that happens when you touch an item in the ListView. I programmed it do download a file and show a ProgressDialog. The error is at this line of…
MaartenDekkers
  • 115
  • 1
  • 1
  • 6
0
votes
2 answers

Android Emulator still showing Hello World

So I've set up my Eclipse to have the Android SDK and ADT plugin. I set up my AVD to have a Galaxy Nexus and Galaxy S2 emulator. I've created a new Android project and I get my blank MainActivity which simply displays "Hello World!" which is the…
Johnzo
  • 13
  • 1
  • 4
0
votes
1 answer

Android fix close main activity with back button

I'm trying to work at a simple book listing application. The app problem is that: if i move from Main Activity to 'New Book Activity', then I click on 'save' button, it comes back to Main. But if I press 'back' hardware button from here, it comes…
d33pcode
  • 27
  • 7
0
votes
3 answers

Src empty, MainActivity doesn't generate

Then i have installed all file of SDK and i have created the New Android Application Project, I saw the src is empty, so there wasn't the MainActivity and a lot of file like the apk or ActivityMain. I cleaned a lot of time the project and "Build…
0
votes
1 answer

Leadbolt App wall not working

I tried to add the Leadbolt "App wall" into my but its not showing. I did it like the documentation explains it. Heres my MainActivity.java package com.NAME.APP; import android.app.Activity; import android.content.Intent; import…
Rajat
  • 47
  • 2
  • 9