Re: [android-developers] How to Create Image List Please help me

2011-06-10 Thread zheng wu
you can find  some examples from APIDemos about Listview or you can google
"Listview" ,there are many examples.

2011/6/9 saikrishna 

> Hello every one I am new to android platform and more over I am
> student with no much hands on experience with android. I am aware of
> the basics on how to create lists and other things. Now I want to add
> Images to my list along with the text. Can anyone please provide with
> resources that help me in completely understanding how to create an
> image list. Please provide me with sample code to better understand
> how it works.
>
> Thanks
> Saikrishna
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] error message "Application has stopped unexpectedly please try again" in android

2011-10-27 Thread zheng wu
you set "private Button btnOne = null;" then btnOne.setOnClickListener(new
View.OnClickListener() {
   public void onClick(View v) {
   text=text+"1";
   editText.setText(text);
   }
   });


2011/10/27 Isham Mohamed Iqbal 

> I'm a newbie to android developing from Sri Lanka.
>
> I coded for a simple calculator, the code is error free (shown in
> eclipse IDE) and while the code starts to run the console window of
> eclipse IDE is not giving any error. After the emulator starts, I got
> "Sorry! Application Hello Android (process com.helloAndroid)has
> stopped unexpectedly please try again".
>
> After I click the "Force close"button the app stops work. I don't have
> any android phone to run that and I used only emulator.
>
> My code is :
> 
> package com.helloAndroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.Button;
> import android.widget.EditText;
> import java.math.*;
>
> public class HelloAndroid extends Activity {
>/** Called when the activity is first created. */
>private EditText editText=null;
>private Button btnOne = null;
>private Button btnTwo = (Button) findViewById(R.id.btnTwo);
>private Button btnThree = (Button) findViewById(R.id.btnThree);
>private Button btnFour = (Button)findViewById(R.id.btnFour);
>private Button btnFive = (Button) findViewById(R.id.btnFive);
>private Button btnSix = (Button) findViewById(R.id.btnSix);
>private Button btnSeven = (Button) findViewById(R.id.btnSeven);
>private Button btnEight = (Button) findViewById(R.id.btnEight);
>private Button btnNine = (Button) findViewById(R.id.btnNine);
>private Button btnZero = (Button) findViewById(R.id.btnZero);
>private Button btnAdd = (Button) findViewById(R.id.btnAdd);
>private Button btnSubstract = (Button)
> findViewById(R.id.btnSubstract);
>private Button btnMultiply = (Button)
> findViewById(R.id.btnMultiply);
>private Button btnSin = (Button) findViewById(R.id.btnSin);
>private Button btnCos = (Button) findViewById(R.id.btnCos);
>private Button btnTan = (Button) findViewById(R.id.btnTan);
>private Button btnPi = (Button) findViewById(R.id.btnPi);
>private Button btnSqrt = (Button) findViewById(R.id.btnSqrt);
>private Button btnSquare = (Button) findViewById(R.id.btnSquare);
>private Button btnEqual = (Button) findViewById(R.id.btnEqual);
>private String text= editText.getText().toString();
>
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>btnOne.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"1";
>editText.setText(text);
>}
>});
>
>btnTwo.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"2";
>editText.setText(text);
>}
>});
>
>btnThree.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"3";
>editText.setText(text);
>}
>});
>
>btnFour.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"4";
>editText.setText(text);
>}
>});
>
>btnFive.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"5";
>editText.setText(text);
>}
>});
>
>btnSix.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"6";
>editText.setText(text);
>}
>});
>
>btnSeven.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"7";
>editText.setText(text);
>}
>});
>
>btnEight.setOnClickListener(new View.OnClickListener() {
>public void onClick(View v) {
>text=text+"8";
> 

Re: [android-developers] Re: Help needed on BUtton CLick

2011-09-05 Thread zheng wu
set the margin property of buttoneg:android:layout_margin=''

2011/9/5 sam 

> I got it fixed Ratheesh , i had a mistake in ma manifest file ..
>
> Can u please guide me how to set the space between the buttons ???
>
> Regards,
> Sam
>
> On Sep 5, 11:53 am, Ratheesh Valamchuzhy  wrote:
> > hi SAM
> >
> > public void onClick(View v)
> >{
> >switch(v.getId())
> >{
> >case R.id.button1:
> >
> >startActivity(new Intent(Screen1.this,Screen2.
> > class));
> > break;
> >
> >case R.id.button3:
> >  startActivity(new Intent(Screen1.this,Screen3.
> > class));
> > break;
> > }
> >}
> >
> > try this
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] I have met some problems when run test Android project

2011-09-13 Thread zheng wu
 "java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.cieaura/com.
cieaura.virtualoffice.activity.VOLogin}:
java.lang.NullPointerException
" ,there is  a error in you code.

2011/9/12 Bich Hong 

> 09-12 13:57:32.966: WARN/dalvikvm(1047): threadid=1: thread exiting
> with uncaught exception (group=0x4001d800)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): FATAL EXCEPTION: main
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047):
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.cieaura/com.cieaura.virtualoffice.activity.VOLogin}:
> java.lang.NullPointerException
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2663)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2679)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.ActivityThread.access$2300(ActivityThread.java:125)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.os.Looper.loop(Looper.java:123)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.ActivityThread.main(ActivityThread.java:4627)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:868)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> dalvik.system.NativeStart.main(Native Method)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): Caused by:
> java.lang.NullPointerException
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> com.cieaura.virtualoffice.activity.VOLogin.onCreate(VOLogin.java:46)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1047)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2627)
> 09-12 13:57:32.996: ERROR/AndroidRuntime(1047): ... 11 more
> 09-12 13:57:33.016: WARN/ActivityManager(67): Error in app com.cieaura
> running instrumentation ComponentInfo{com.cieaura.test/
> android.test.InstrumentationTestRunner}:
> 09-12 13:57:33.016: WARN/ActivityManager(67):
> java.lang.NullPointerException
> 09-12 13:57:33.016: WARN/ActivityManager(67):
> java.lang.NullPointerException: Unable to start activity
> ComponentInfo{com.cieaura/com.cieaura.virtualoffice.activity.VOLogin}:
> java.lang.NullPointerException
> 09-12 13:57:33.037: INFO/ActivityManager(67): Force stopping package
> com.cieaura uid=10038
> 09-12 13:57:33.066: INFO/Process(67): Sending signal. PID: 1047 SIG: 9
> 09-12 13:57:33.136: DEBUG/AndroidRuntime(1041): Shutting down VM
> 09-12 13:57:33.145: DEBUG/jdwp(1041): Got wake-up signal, bailing out
> of select
> 09-12 13:57:33.145: DEBUG/dalvikvm(1041): Debugger has detached;
> object registry had 1 entries
> 09-12 13:57:33.206: INFO/AndroidRuntime(1041): NOTE: attach of thread
> 'Binder Thread #3' failed
> 09-12 13:57:33.206: INFO/UsageStats(67): Unexpected resume of
> com.android.launcher while already resumed in com.cieaura
> 09-12 13:57:33.256: WARN/InputManagerService(67): Window already
> focused, ignoring focus gain of:
> com.android.internal.view.IInputMethodClient$Stub$Proxy@45056300
> 09-12 13:57:38.596: DEBUG/dalvikvm(291): GC_EXPLICIT freed 32
> objects / 1512 bytes in 141ms
> 09-12 13:57:43.666: DEBUG/dalvikvm(196): GC_EXPLICIT freed 145
> objects / 10784 bytes in 154ms
> 09-12 13:58:24.466: DEBUG/StatusBar(67): DISABLE_EXPAND: yes
> 09-12 13:58:29.746: DEBUG/dalvikvm(180): GC_EXPLICIT freed 19
> objects / 736 bytes in 146ms
> 09-12 13:58:34.776: DEBUG/dalvikvm(129): GC_EXPLICIT freed 32
> objects / 1792 bytes in 156ms
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com