[android-developers] Re: list add item error

2009-06-24 Thread Tsai stanly
thanks for your help!

from my DDMS on my Eclipse,
it just show:
"[2009-06-24 20:06:02 - DeviceMonitor]Error reading jdwp list: EOF"

and how to use the adb logcat? thanks!
2009/6/24 Mark Murphy 

>
> Tsai stanly wrote:
> > with the location parameter,
> > when into the app,will show
> > "the application demo(process demo.app) has stopped on unexpectedly,
> > please try again"
> >
> > without location, it works!!
>
> And your Java stack trace tells you...what?
>
> You can examine your Java stack trace via adb logcat, standalone DDMS,
> or the DDMS perspective in Eclipse.
>
> Whenever you get the "stopped unexpectedly" dialog, you will have a
> stack trace showing your exception, which will tell you everything you
> need to know about why your code failed.
>
> --
>  Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 0.9 Available!
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: list add item error

2009-06-24 Thread Tsai stanly
with the location parameter,
when into the app,will show
"the application demo(process demo.app) has stopped on unexpectedly,
please try again"

without location, it works!!


2009/6/24 Mark Murphy 

>
> tstanly wrote:
> > hi all,
> >
> > it's so strange!!
> >
> > i have a list decleared:
> > public static List list1=new ArrayList();
> > and use
> >
> > list1.add(str);
> > it is ok!
> >
> > but use
> > list1.add(index,str);
> > program will be error
>
> What is the error?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 0.9 Available!
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: how to close activity?

2009-06-23 Thread Tsai stanly
no...if you don't use the finish(),

and variables would not kill automatically,
variables include some static variable

2009/6/23 Fei Zhang 

> I don't think you need close 2, the system will do it! Is it right?
>
>  2009/6/23 tstanly 
>
>>
>>  hi all,
>>
>> i have a app,the structure composed three .java,
>> 1.java,2.java,3.java
>>
>> their relationship is:
>> 1->2->3
>> and 3 can go back to 1
>>
>> when i was back to 1 from 3,
>> i want to close the 2,
>>
>> how to do this?
>> thanks!! >>
>>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with setExtra

2009-06-22 Thread Tsai stanly
http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String,%20int
)

2009/6/22 Sujay Krishna Suresh 

> by doesnt work do u mean that u r unable to read the extra in ur target
> activity?
> if so plz post d code tat u r usin for this purpose... so tat we can find d
> actual mistake..
>
> On Mon, Jun 22, 2009 at 1:40 PM, Will  wrote:
>
>>
>> I am trying to setExtra(string, int) in an Intent which will be used
>> in startActvityForResult(). This works:
>>
>>Intent i = new Intent(this, ClassA.class);
>>i.setAction(ACTION_CUTSOM);
>>startActivityForResult(i, ACTIVITY_CUSTOM);
>>
>> This doesn't:
>>
>>Intent i = new Intent(this, ClassA.class);
>>i.putExtra(intStringName, intArg); // where the args are (String,
>> int)
>>i.setAction(ACTION_CUTSOM);
>>startActivityForResult(i, ACTIVITY_CUSTOM);
>>
>> If I try to catch the putExtra with a try/catch block, it still fails.
>> Any reason why this doesn't work?
>>
>>
>
>
> --
> Regards,
> Sujay
> Fran Lebowitz 
> - "Life is something to do when you can't get to sleep."
>  >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: global variable and get website address question

2009-06-19 Thread Tsai stanly
solved.

for two:
use  WebViewClient.getTitle()

for one:
eg:
class A{
 static int a=1;
 public void doSomethingElse(){
}
}
class B{
 public void doAddA(){
   A.a=A.a+1;
 }
}



2009/6/19 Tsai stanly 

> sorry,about first quest,
> I want the variable can deliver between different .java in the same
> project.
>
> 2009/6/19 Tsai stanly 
>
>  thanks for your reply,
>>
>> for first question,
>> how can i do the garbage collection?
>> for second,
>> i was implement,but haw can get the link "address"?
>>
>> my code of implement shouldOverrideUrlLoading is bellow,
>> how can i get address? thanks!
>>
>> private class class_WebViewClient extends WebViewClient {
>>  @Override
>>  public boolean shouldOverrideUrlLoading(WebView view, String url) {
>>  view.loadUrl(url);
>>  return true;
>>  }
>>   }
>> 2009/6/19 Mark Murphy 
>>
>>
>>> > one is how can I define a global variable that can deliver between
>>> > several activities?
>>>
>>> If the activities are all in your process, you can use a public static
>>> data member. Be careful, though, that you do not mess up your garbage
>>> collection -- things held onto from static data members never get garbage
>>> collected.
>>>
>>> > two is how can I get the website address when I link to other sites?
>>> > for detail,
>>> > i use the webview to browse the web,but when i click the link on the
>>> > web,
>>> > i want to get the linking address
>>>
>>> Attach a WebViewClient to your WebView, then implement
>>> shouldOverrideUrlLoading() on the WebViewClient.
>>>
>>> --
>>> Mark Murphy (a Commons Guy)
>>> http://commonsware.com
>>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>>
>>>
>>>
>>> >>>
>>>
>>
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: global variable and get website address question

2009-06-19 Thread Tsai stanly
sorry,about first quest,
I want the variable can deliver between different .java in the same project.

2009/6/19 Tsai stanly 

> thanks for your reply,
>
> for first question,
> how can i do the garbage collection?
> for second,
> i was implement,but haw can get the link "address"?
>
> my code of implement shouldOverrideUrlLoading is bellow,
> how can i get address? thanks!
>
> private class class_WebViewClient extends WebViewClient {
>  @Override
>  public boolean shouldOverrideUrlLoading(WebView view, String url) {
>  view.loadUrl(url);
>  return true;
>  }
>   }
> 2009/6/19 Mark Murphy 
>
>
>> > one is how can I define a global variable that can deliver between
>> > several activities?
>>
>> If the activities are all in your process, you can use a public static
>> data member. Be careful, though, that you do not mess up your garbage
>> collection -- things held onto from static data members never get garbage
>> collected.
>>
>> > two is how can I get the website address when I link to other sites?
>> > for detail,
>> > i use the webview to browse the web,but when i click the link on the
>> > web,
>> > i want to get the linking address
>>
>> Attach a WebViewClient to your WebView, then implement
>> shouldOverrideUrlLoading() on the WebViewClient.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com
>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: global variable and get website address question

2009-06-19 Thread Tsai stanly
thanks for your reply,

for first question,
how can i do the garbage collection?
for second,
i was implement,but haw can get the link "address"?

my code of implement shouldOverrideUrlLoading is bellow,
how can i get address? thanks!

private class class_WebViewClient extends WebViewClient {
 @Override
 public boolean shouldOverrideUrlLoading(WebView view, String url) {
 view.loadUrl(url);
 return true;
 }
  }
2009/6/19 Mark Murphy 

>
> > one is how can I define a global variable that can deliver between
> > several activities?
>
> If the activities are all in your process, you can use a public static
> data member. Be careful, though, that you do not mess up your garbage
> collection -- things held onto from static data members never get garbage
> collected.
>
> > two is how can I get the website address when I link to other sites?
> > for detail,
> > i use the webview to browse the web,but when i click the link on the
> > web,
> > i want to get the linking address
>
> Attach a WebViewClient to your WebView, then implement
> shouldOverrideUrlLoading() on the WebViewClient.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: how can alert dialog add/delete items arbitrary?

2009-06-18 Thread Tsai stanly
solved
use android.app.AlertDialog.Builder
there has "setAdapter" method

2009/6/18, tstanly :
>
>
> hi all,
>
> I wish my alert dialog can add/remove items arbitrary,
> but I looked for the sdk reference but nothing method can use,
> is somone knows how to do?
>
>
> thanks
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: android.os.SystemProperties???

2009-06-17 Thread Tsai stanly
thanks for your answer,
so it can't be use?


2009/6/18, Dianne Hackborn :
>
> It is private.
>
> On Wed, Jun 17, 2009 at 9:07 AM, tstanly  wrote:
>
>>
>> hi all,
>>
>> when i  research the android browser source code,
>> there are BrowserSetting.java in the src dir,
>> and the code import "android.os.SystemProperties",
>> but there are nothing in the reference?
>>
>> am i ignore for something?
>>
>>
>> thanks!
>>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] when program has edittext and webview

2009-06-15 Thread Tsai stanly
hi,

there have some problems when adding edittext and webview,
the edittext is upon the webview,
the problem is the mouse always focus on edittext,
so i can't type the id or password in the webview??

so, how to solved???

thanks!!!


stanly

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---