I am learning to make android apps and I have a problem with my hello world programs buttons.
Here's my code:
package com.Norwood.helloandroid; import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends Activity {
/** Called when the activity is first created.
hi the function startActivity throws a nullpointer exception
this is my class:
package com.example.xxxx.fragments.frag4;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.util.Log;
import android.view.Menu;
import android.widget.TextView;
import com.example.xxxx.R;
public class DetailActivity extends Activity {
@O
I have made simple program to retrieve the location my code is as below...
package com.example.locn;
import android.app.Activity;
import android.content.Context;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationManager;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widge
I have two checkboxes . pencil and book. And I have 1 textview to total:
package apa.y;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
public class myprice extends Activity {
/** Called when the activity is first created.
I have this activity:
package zh.wang.android.yweathergetter;
import greendroid.app.GDActivity;
import zh.wang.android.utils.YahooWeather4a.WeatherInfo;
import zh.wang.android.utils.YahooWeather4a.YahooWeatherInfoListener;
import zh.wang.android.utils.YahooWeather4a.YahooWeatherUtils;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivit
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 problem with this API.
I've written a simple application which has a TextView which, when clicked, changes into an EditText.
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
public class Main extends Activity {
I am trying to build a simple application with a button "Play" for Android.In the MainActivty.java file,I get errors with the following code,so what do I need to rectify here?
package com.example.simplemusicplayer;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
pub