How do I save the way my Activity is so when closed with the back button and resumed it will be the same way it was when closed.
this is my Activity code:
public class Levels extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setTheme(android.R.style.Theme_NoTitleBar_Fullscreen);
I'm creating an app wich is supposed to do the following:
- When started shows a splash/info-activity.
- In next activity shows a list of names as checkboxes
- user can add new names via EditText & Add-button (list updated dynamically)
- When closing app, and reopening, names previously added should be saved and displayed in list.
I've tried to setup my list as ArrayList in my startingactivity
I'm really struggling with how to save changes to my file.txt using edittext. So far my code will allow me to open up the text file, but when closing it, it will not save the changes that have been made. The text file is being opened into another activity and will save the changes when orientation changes and if it is minimized.
i've created my android login with connection to my PHP and mysql, the thing is, every time i run my program and inputting the right email and password it always says android.os.NetworkOnMainException in my EditText, or when i'm deleting the code for that nothing happens. Did i made mistakes in my codings or am i missing something.
I am try to add theme change option in my application.I have a main activity called timeline.And from there user can go to themechange activity can change theme.It changes the theme of the themechange activity but not the timeline i.e mainactivity.When i reload the timeline activity again i can see the chnage.
Then i add the following code to save button in themechange activity to reload timeline
I have an AlertDialog that shows when a button is pressed; saves the user's name when the Alert "Done" button is pressed; then moves user to another activity.
My app has 2 activities:
- Activity (1) has a button to start Activity (2), this button isn't set transparent
- Activity (2) has a button that is transparent by setAlpha()
My problem is sometimes, when I back to Activity (1) from Activity (2) by pressing back button, a button of Activity (1) becomes transparent same as button of Activity (2).
I don't know why this problem can occur, please help
main activitythis code has a log-in screen and data entry screen it was working but
wont work now and wont give any errors i fixed this before but can remember
package com.Trish.diabetesapp;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widge
In this activity i was trying to store data dynamically but when im pressing back button in my emulator my list items are getting deleted.....
This is my main activity...
public class Dynamic extends Activity {
Button bt,bt2;
EditText et,et2;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);