I have two activities:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void click(View view) {
Intent intent= new Intent(this, TranslucentActivity.class);
startActivity(intent);
}
}
public class TranslucentActivity extends Activity
I Have been working on this program as an assignment and this question I have been trying to answer and to me it should be just:
Bundle data = getIntent().getExtras();
But it is incorrect!
The code below and the question below is what leads me to this answer.
import android.app.Activity;
import android.os.Bundle;
public class HelloWorld extends Activity {
/** Called when the activity is
I have a ListFragment and I want to edit item when clicked in List View.
This is psuedo code of my List Fragment.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.setHasOptionsMenu(true);
so i get the main idea of how to use
protected void onSaveInstanceState (Bundle outState)
http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)
also from Saving Activity state in Android
but my problem is what if this was the first time the application is being created?
i am writing one activity class like below
public class HeaderFooter extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.headerfooter);
}
}
and i am extending one more class from HeaderFooter class
public class Home extends HeaderFooter
{
@Override
public voi
I have a fairly simple DialogFragment.
I created a sample app in android using SQLCilpher,so it is by default in encrypted form cause of this i am not able to see what is in my table create in my database.
public class SqLiteActivity extends Activity {
/** Called when the activity is first created.
I'm in the process of writing my first Android app on a Linux system.
I have a TextView. I want to update its text (append a "1") after 1 second of a button click.
public class HaikuDisplay extends Activity {
Method m;
Timer t;
/** Called when the activity is first created.