how to getText from a dynamically EditText inside a tablerow and use it in another activity take look to our code :
**this is the MainActivity.java**
public class MainActivity extends Activity {
private EditText ed_;
private Button b_sub;
private int nbr ;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentVie
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 am creating a simple app in eclipse but I am getting error at this line
b.setOnClickListener(new OnClickListener()
please have a look at the entire program
package com.example.activity2;
public class Main extends Activity {
//Called when the activity is first created.
How to Create A PDF fiel in raw ..Eventhough I Was using iText.jar I was geting an error specifying File Not Found Error and also saying File cannot be Opened .Here is the code
/** Called when the activity is first created.
I have a button that links to another activity, when I click on it it goes to the layout.xml I want it to
This is the java file for the main/first screen
Button button;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
addListenerOnButton();
}
public void addListenerOnButton() {
final Context context
I have made a program of simple alert box in android.now i have to put two buttons "OK" and "cancel" but when i run the program it only shows ,the "cancel" button...my code is as below:
Main.java
public class MainActivity extends Activity {
Button btn;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout
I want to turn the android screen on button click,Now i had written a program for this in is not showing any errors also its not working..
The code for this is..
public class MainActivity extends Activity {
Button powerOff;
int amountOfTime =20*1000;
Context context = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(
I am trying to create an android messaging application.This is my code and when i run it i get an error saying "Unfortunately app has stopped".
My application works fine on an emulator but when i run it on tablet. I get nullpointer exception.