[android-developers] adding a image just below the progressbar

2012-06-13 Thread for android
How can i create a custom view where i can add a imageview just below the
progress percentage in the progress bar. That is I need an image just below
say 70% or 80% based on where the progress bar is?

-- 
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] Re: find out which activity resumed/started my activity?

2012-01-23 Thread for android
I was able to figure out a way to achieve my requirement of having a
password entered whenever my app has been triggered from another
application.Basically extend this class except for my lancher activity.

public abstract class BaseActivity_old extends Activity {
 boolean isCreated = false;

protected abstract void setLayout();

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
isCreated = true;

}



@Override
public void onBackPressed() {
// TODO Auto-generated method stub
Log.d("BaseActivity", "this is onBackPressed");
setResult(RESULT_OK, getIntent());
finish();
super.onBackPressed();
}


@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
 if (isCreated) {
isCreated = false;
setLayout();// my app specific imple.. app is called from my own application
return;
}


if (hasNavigatedFromAppBackButton) {
Log.d("BaseActivity", "this is called from my application");
setLayout();// my app specific imple
} else {

setValidationLayout();
Log.d("BaseActivity", "this is not called from my application");
}
hasNavigatedFromAppBackButton = false;
}

private void setValidationLayout() {
///my app specific imple
}

protected void callMyAppActivity(Intent intent) {
intent.putExtra("my_app", true);
startActivityForResult(intent, 123);
}

boolean hasNavigatedFromAppBackButton = false;

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent
data) {
// TODO Auto-generated method stub
hasNavigatedFromAppBackButton = true;
Log.d("BaseActivity", "onActivityResult " + requestCode);
super.onActivityResult(requestCode, resultCode, data);
}

}


On Mon, Jan 23, 2012 at 10:29 PM, Mark Murphy wrote:

> On Mon, Jan 23, 2012 at 11:24 AM, uday kiran jandhyala
>  wrote:
> > So far in Android, there is no way we could query WindowManager to
> > retrieve a list of titles of all such "Windows"...
> > Is this statement right?
>
> Correct.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> 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

[android-developers] find out which activity resumed/started my activity?

2012-01-23 Thread for android
Is there any way can i see whether my application' activity itself started
my activity or if it was resumed after a phone call or from the task
manager(which shows the lsit of all application on long click of the home
button.)

I tried to put extras in my activity,but that works only when i am in
my applications activity.When i click the home button and come back to my
activity,do i have a way to know that i am coming from another process.I
need to implement a password functionalality whenever i come from a
different application.

-- 
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] start emulator with ant

2010-09-01 Thread for android
I need to start the emulator from an ant script run the test cases and stop
the emulator.Any pointers on how to acheive 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

[android-developers] Adobe 10.1 player

2010-08-24 Thread for android
Does the Adobe 10.1 player expose any intents so that other applications can
use for playing flash videos?A quick Google could not yield me useful
result?

-- 
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: WebView question

2010-08-04 Thread for android
any one?

On Mon, Aug 2, 2010 at 5:51 PM, for android  wrote:

> I have seen the WebView Demo for JS alerts and the uses.I have not been
> able to find out whether we could actually get a result of JS in the
> java-code.Anypointers?
>
> 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] WebView question

2010-08-02 Thread for android
I have seen the WebView Demo for JS alerts and the uses.I have not been able
to find out whether we could actually get a result of JS in the
java-code.Anypointers?

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

Re: [android-developers] Re: Using barcode scanner as input method?

2010-07-30 Thread for android
Don't you guys think that BarCode reading should be part of a the SDK
itself,instead of everyone creating their own kind of
implementations???Thoughts?

On Mon, Jun 28, 2010 at 10:13 AM, Brad Gies  wrote:

> What's the problem you are having?
>
> The Zxing barcode scanner returns the barcode to your app... and you only
> need to put where you want it.
>
>
>
>
> On 27/06/2010 9:39 PM, brucko wrote:
>
>>
>> On Jun 17, 12:44 am, PinkSharK  wrote:
>>
>>
>>> +1, I am also interested in it. I have installed two of the first free
>>> applications from the Android Market listed when looking for
>>> "barcode":BarcodeScanner from ZXing Team and pic2shop by Vision
>>> Smarts. Unfortunately, both do not allow this simple feature: scan
>>> abarcodeusing the camera to put the string of digits at the cursor
>>> position. Do not tell me I have to develop an application from scratch
>>> to get this...
>>> PinkSharK
>>>
>>>
>> I am an now actually working on a developing a couple of small apps to
>> achieve exactly this.
>>
>> What type of scenarios are you looking to use this functionality?
>>
>> Do you need to scan barcodes as a one off or many at once?
>>
>>
>>
>
> --
> Sincerely,
>
> Brad Gies
> ---
> Bistro Bot - Bistro Blurb
> http://www.bgies.com
> http://www.bistroblurb.com
> http://www.ihottonight.com
> ---
>
> Never doubt that a small group of thoughtful, committed people can
> change the world. Indeed. It is the only thing that ever has - Margaret
> Mead
>
>
> --
> 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

[android-developers] Re: Prob with remote service:

2009-11-23 Thread for android
any help?

On Mon, Nov 23, 2009 at 1:01 PM, for android  wrote:

> I am binding a remote service from an activity and unbind the same on the
> onPause of the Activity,when the activity again restarts i bind the service
> .It does bind with the remote service and i am also successful in getting
> the remote-service method getting executed after the restart.But when
> returning a message from the callback-RemoteCallbackList.the
> mCallbacks.beginBroadcast returns me 0 clients.Am i missing some thing here
> ?why am i am getting zero clients when I call mCallbacks.beginBroadcast.??
>
> -
> @Override
> public void onDestroy() {
>
> // Unregister all callbacks.
> mCallbacks.kill();
>
> System.out.println("I am destroyin");
>
> }
> @Override
> public IBinder onBind(Intent intent) {
> if (IRemoteWSService.class.getName().equals(intent.getAction())) {
>
> return mBinder;
> }
> if (IWSSecondary.class.getName().equals(intent.getAction())) {
>
> return mSecondaryBinder;
> }
>
> return null;
> }
> private final Handler mHandler = new Handler() {
> @Override
> public void handleMessage(Message msg) {
> switch (msg.what) {
>
> // It is time to bump the value!
> case ONSUCCES: {
>
> System.out.println("Remote ONSUCCES");
> // Broadcast to all clients the new value.
> final int N = mCallbacks.beginBroadcast();
> System.out.println("n "+N);
> for (int i = 0; i < N; i++) {
> try {
>
>
> mCallbacks.getBroadcastItem(i).onSuccess(successBundle);
> } catch (RemoteException e) {
> // The RemoteCallbackList will take care of
> removing
> // the dead object for us.
> }
> }
> mCallbacks.finishBroadcast();
> }
> break;
> // It is time to bump the value!
> case ONERROR: {
> //System.out.println("Remote ONERROR");
>
> // Broadcast to all clients the new value.
> final int N = mCallbacks.beginBroadcast();
> for (int i = 0; i < N; i++) {
> try {
>
> mCallbacks.getBroadcastItem(i).onError();
> } catch (RemoteException e) {
> // The RemoteCallbackList will take care of
> removing
> // the dead object for us.
> }
> }
> mCallbacks.finishBroadcast();
>
> }
> }
> }
> -
>

-- 
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] Prob with remote service:

2009-11-22 Thread for android
I am binding a remote service from an activity and unbind the same on the
onPause of the Activity,when the activity again restarts i bind the service
.It does bind with the remote service and i am also successful in getting
the remote-service method getting executed after the restart.But when
returning a message from the callback-RemoteCallbackList.the
mCallbacks.beginBroadcast returns me 0 clients.Am i missing some thing here
?why am i am getting zero clients when I call mCallbacks.beginBroadcast.??

-
@Override
public void onDestroy() {

// Unregister all callbacks.
mCallbacks.kill();

System.out.println("I am destroyin");

}
@Override
public IBinder onBind(Intent intent) {
if (IRemoteWSService.class.getName().equals(intent.getAction())) {

return mBinder;
}
if (IWSSecondary.class.getName().equals(intent.getAction())) {

return mSecondaryBinder;
}

return null;
}
private final Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {

// It is time to bump the value!
case ONSUCCES: {

System.out.println("Remote ONSUCCES");
// Broadcast to all clients the new value.
final int N = mCallbacks.beginBroadcast();
System.out.println("n "+N);
for (int i = 0; i < N; i++) {
try {


mCallbacks.getBroadcastItem(i).onSuccess(successBundle);
} catch (RemoteException e) {
// The RemoteCallbackList will take care of removing
// the dead object for us.
}
}
mCallbacks.finishBroadcast();
}
break;
// It is time to bump the value!
case ONERROR: {
//System.out.println("Remote ONERROR");

// Broadcast to all clients the new value.
final int N = mCallbacks.beginBroadcast();
for (int i = 0; i < N; i++) {
try {

mCallbacks.getBroadcastItem(i).onError();
} catch (RemoteException e) {
// The RemoteCallbackList will take care of removing
// the dead object for us.
}
}
mCallbacks.finishBroadcast();

}
}
}
-

-- 
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] Re: Widget Layout Frustration

2009-11-11 Thread for android
Oh ok.I was under the assumption that only the launcher application
understands that Intent.

On Wed, Nov 11, 2009 at 9:49 PM, Romain Guy  wrote:

> That's the common Intent.
>
> On Wed, Nov 11, 2009 at 1:22 AM, for android  wrote:
> > i was referring to the INSTALL_SHORTCUT in the launcher application with
> > action "com.android.launcher.action.INSTALL_SHORTCUT"
> > which refers to the Launcher application.Is there any common Intent for
> > that?
> >
> > On Thu, Nov 5, 2009 at 9:09 PM, Romain Guy  wrote:
> >>
> >> >Is there any common intent to create short-cuts accross "Home"
> >> > applications.Because as I see it if the user is using any other
> >> > application
> >> > as the desktop,the short-cut is not created for those applications.
> >>
> >> Yes, there is. If it doesn't work in some Home screens, they are doing
> >> a poor job :)
> >>
> >> >
> >> > On Thu, Nov 5, 2009 at 11:09 AM, Romain Guy 
> >> > wrote:
> >> >>
> >> >> Just create a shortcut. Apps can offer shortcuts.
> >> >>
> >> >> On Wed, Nov 4, 2009 at 9:17 PM, Susan  wrote:
> >> >> > Romain,
> >> >> >
> >> >> > I understand what you're saying and I am generally in favor of not
> >> >> > trying to fit a square peg in a round hole. However, it seems like
> >> >> > there are other valid reasons for making a widget look like an
> icon.
> >> >> > For example, if I wanted to use a different icon for a standard app
> >> >> > --
> >> >> > maybe to make it easier to see for someone with vision problems or
> to
> >> >> > make it brighter so it can be seen more easily while driving. Is
> >> >> > there
> >> >> > some better way to change an icon than to make a whole new widget?
> >> >> >
> >> >> > Thanks!
> >> >> >
> >> >> > Susan
> >> >> >
> >> >> > PS - Thanks, Evan, that's super helpful!
> >> >> >
> >> >> > On Nov 4, 4:47 pm, Romain Guy  wrote:
> >> >> >> No, that's not what I mean. I mean that shortcuts should look like
> >> >> >> shortcuts and widgets like widgets. Just don't expect your code to
> >> >> >> keep matching Home across devices, themes, versions, etc.
> >> >> >>
> >> >> >> > They do EXACTLY what they say
> >> >> >> > and don't take up any more than the minimum space;
> >> >> >>
> >> >> >> You don't have to make thewidgetlook like a shortcut for that.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> > E
> >> >> >>
> >> >> >> > On Nov 4, 5:07 pm, Romain Guy  wrote:
> >> >> >> >> You cannot change thetextoriconof a shortcut. Just don't make
> >> >> >> >> your
> >> >> >> >>widgetlook like a shortcut. There's no reason to make it look
> like
> >> >> >> >> a
> >> >> >> >> shortcut if it's awidget. It's just misleading.
> >> >> >>
> >> >> >> >> On Wed, Nov 4, 2009 at 2:05 PM, Evan Ruff  >
> >> >> >> >> wrote:
> >> >> >> >> > RG,
> >> >> >>
> >> >> >> >> > Mywidgetmanages the state of a Service running in the
> >> >> >> >> > background.
> >> >> >> >> > As
> >> >> >> >> > you click thewidgetit starts/stops/pauses/etc the service. I
> >> >> >> >> > want
> >> >> >> >> > it
> >> >> >> >> > to look like a Shortcut so that it fits into the Home Screen
> >> >> >> >> > seamlessly. Additionally, theiconandtextchange depending on
> the
> >> >> >> >> > state of the service. Is there a way to do that using a
> >> >> >> >> > shortcut
> >> >> >> >> > without going with awidget? Otherwise, can you think of
> another
> >> >> >> >> > way
> >> >> >> >> >

Re: [android-developers] Re: Widget Layout Frustration

2009-11-11 Thread for android
i was referring to the INSTALL_SHORTCUT in the launcher application with
action "com.android.launcher.action.INSTALL_SHORTCUT"
which refers to the Launcher application.Is there any common Intent for
that?

On Thu, Nov 5, 2009 at 9:09 PM, Romain Guy  wrote:

> >Is there any common intent to create short-cuts accross "Home"
> > applications.Because as I see it if the user is using any other
> application
> > as the desktop,the short-cut is not created for those applications.
>
> Yes, there is. If it doesn't work in some Home screens, they are doing
> a poor job :)
>
> >
> > On Thu, Nov 5, 2009 at 11:09 AM, Romain Guy 
> wrote:
> >>
> >> Just create a shortcut. Apps can offer shortcuts.
> >>
> >> On Wed, Nov 4, 2009 at 9:17 PM, Susan  wrote:
> >> > Romain,
> >> >
> >> > I understand what you're saying and I am generally in favor of not
> >> > trying to fit a square peg in a round hole. However, it seems like
> >> > there are other valid reasons for making a widget look like an icon.
> >> > For example, if I wanted to use a different icon for a standard app --
> >> > maybe to make it easier to see for someone with vision problems or to
> >> > make it brighter so it can be seen more easily while driving. Is there
> >> > some better way to change an icon than to make a whole new widget?
> >> >
> >> > Thanks!
> >> >
> >> > Susan
> >> >
> >> > PS - Thanks, Evan, that's super helpful!
> >> >
> >> > On Nov 4, 4:47 pm, Romain Guy  wrote:
> >> >> No, that's not what I mean. I mean that shortcuts should look like
> >> >> shortcuts and widgets like widgets. Just don't expect your code to
> >> >> keep matching Home across devices, themes, versions, etc.
> >> >>
> >> >> > They do EXACTLY what they say
> >> >> > and don't take up any more than the minimum space;
> >> >>
> >> >> You don't have to make thewidgetlook like a shortcut for that.
> >> >>
> >> >>
> >> >>
> >> >> > E
> >> >>
> >> >> > On Nov 4, 5:07 pm, Romain Guy  wrote:
> >> >> >> You cannot change thetextoriconof a shortcut. Just don't make your
> >> >> >>widgetlook like a shortcut. There's no reason to make it look like
> a
> >> >> >> shortcut if it's awidget. It's just misleading.
> >> >>
> >> >> >> On Wed, Nov 4, 2009 at 2:05 PM, Evan Ruff 
> >> >> >> wrote:
> >> >> >> > RG,
> >> >>
> >> >> >> > Mywidgetmanages the state of a Service running in the
> background.
> >> >> >> > As
> >> >> >> > you click thewidgetit starts/stops/pauses/etc the service. I
> want
> >> >> >> > it
> >> >> >> > to look like a Shortcut so that it fits into the Home Screen
> >> >> >> > seamlessly. Additionally, theiconandtextchange depending on the
> >> >> >> > state of the service. Is there a way to do that using a shortcut
> >> >> >> > without going with awidget? Otherwise, can you think of another
> >> >> >> > way
> >> >> >> > to use the OS-level resources to render the same sort of thing?
> >> >>
> >> >> >> > Thanks!
> >> >>
> >> >> >> > Evan
> >> >>
> >> >> >> > On Nov 4, 4:59 pm, Romain Guy  wrote:
> >> >> >> >> Note that Home uses a custom view derived from TextView to
> create
> >> >> >> >> this
> >> >> >> >> effect. Also, if you want yourwidgetto look like a shortcut,
> why
> >> >> >> >> provide awidgetin the first place? It's very easy for
> >> >> >> >> applications
> >> >> >> >> to offer shortcuts and let Home take care of how it looks (what
> >> >> >> >> will
> >> >> >> >> happen to yourwidgetwith other Home screens? What if we decide
> to
> >> >> >> >> change the radius of the background behind thetext? etc.)
> >> >>
> >> >> >> >> On Wed, Nov 4, 2009 at 1:55 PM, Evan Ruff  >
> >> >> >> >> wrote:
> >> >> >> >> > Susan,
> >> >>
> >> >> >> >> > I've tweaked it a little bit more and here is where I'm at:
> >> >>
> >> >> >> >> >
> http://i243.photobucket.com/albums/ff2/gte619n/widgetLayout.png
> >> >>
> >> >> >> >> > Pixel for Pixel, thetextis exactly the same. The location
> >> >> >> >> > within the
> >> >> >> >> > bounding box is the same, as is the distance between
> thetextand
> >> >> >> >> > the
> >> >> >> >> > graphic. In order to do this, I used the XML Layout and an
> XML
> >> >> >> >> > drawable, no 9-patch was necessary.
> >> >>
> >> >> >> >> > Here's the code:
> >> >> >> >> > res/drawable/text_border.xml
> >> >> >> >> >  >> >> >> >> > xmlns:android="http://schemas.android.com/apk/res/android";>
> >> >> >> >> >
> >> >> >> >> > >> >> >> >> > android:bottom="1dp" android:top="1dp" />
> >> >> >> >> >
> >> >> >> >> > 
> >> >>
> >> >> >> >> > res/layout/widget.xml
> >> >> >> >> > 
> >> >> >> >> > http://schemas.android.com/apk/res/
> >> >> >> >> > android"
> >> >> >> >> >android:layout_width="fill_parent"
> >> >> >> >> >android:layout_height="fill_parent"
> >> >> >> >> >android:layout_gravity="center"
> >> >> >> >> >>
> >> >> >> >> > >> >> >> >> > xmlns:android="http://schemas.android.com/apk/res/
> >> >> >> >> > android"
> >> >> >> >> >android:orientation="vertical"
> >> >> >> >> >a

[android-developers] Re: Extremely long DNS lookup (and failure) on T-Mobile network

2009-10-14 Thread for android
http://code.google.com/p/android/issues/detail?id=2764




On Thu, Oct 15, 2009 at 4:40 AM, tomei.ninge...@gmail.com <
tomei.ninge...@gmail.com> wrote:

>
> Hello,
>
> This happens only when my G1 phone is on T-Mobile network:
>
> I found that when I try to go to the browser, and type the address
>
>http://i0.sinaimg.cn/
>
> The browser tries to load the page, but no progress is shown for more
> than 2 minutes.
>
> (I have full 3G signal; all other addresses work just fine)
>
> Eventually when I tried to access this URL in my Java code, I found a
> similar long delay when I try to open the HttpUrlConnection, and
> eventually I get this exception:
>
> I/InetAddress( 1940): Unknown host i0.sinaimg.cn, throwing
> UnknownHostException
> W/System.err( 1940): java.net.UnknownHostException: Host is
> unresolved: i0.sinaimg.cn:80
> W/System.err( 1940):at java.net.Socket.connect(Socket.java:1002)
>
> Why would DNS take so long? Also, if my program tries to issue the
> same HTTP request again, the same 2+ minute blocking happened.
>
> Is this an Android bug or a T-Mobile infrastructure bug? It seems the
> Android API should try to time-out faster, especially on the second
> attempt.
>
>
>
> >
>

--~--~-~--~~~---~--~~
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] Question on application icon

2009-10-13 Thread for android
I want to change the application icon depending on the phone dynamically.Is
it possible?

--~--~-~--~~~---~--~~
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] Question on task affinites

2009-10-05 Thread for android
Here's my requirement:

I need to start an Theme Dialog activity from a widget.From this widget I
need to start another activity from another application and get the result
from there to be used in the Theme Dialog activity.

Now if I have the application in standard mode,then this activities becomes
a part of my  activity task(which I donot want).I tried the following modes:

singleInstance-- here the problem was that i could not get the result from
another activity.
singleTask   --- here the problem was that this became a part of my
application activity stack.

How do I solve this issue?What I need is that my dialog activity to be a
different task and it should still be able to start its new activities to
get results
.
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: Remote Process Question

2009-09-16 Thread for android
Thanks.I was able to solve the problem.It would be useful if this piece of
information is documented in the Process and Thread section of Application
Fundamentals.

On Wed, Sep 16, 2009 at 10:17 AM, Dianne Hackborn wrote:

> Well there is a limit of 16 active threads calling into a process at once.
> You might to look in the debugger at what your threads are doing.
>
> On Tue, Sep 15, 2009 at 8:22 PM, for android  wrote:
>
>> any-one?
>>
>>
>> On Tue, Sep 15, 2009 at 3:14 PM, for android wrote:
>>
>>> <>
>>>
>>> This happens even before I unbind
>>>
>>> <>> could be>>
>>>
>>> Is there any work around for this? Are you sure that there is a
>>> limitation.
>>>
>>>
>>> On Tue, Sep 15, 2009 at 3:08 PM, Cyril ROQUES <
>>> cyril.roq...@mobiquant.com> wrote:
>>>
>>>>  May be you doesn’t clean everything correctly after your unbind
>>>>
>>>> It seems to have a limitation of 16 things but I have no idea what it
>>>> could be
>>>>
>>>>
>>>>
>>>> *From:* android-developers@googlegroups.com [mailto:
>>>> android-develop...@googlegroups.com] *On Behalf Of *for android
>>>> *Sent:* mardi 15 septembre 2009 11:20
>>>> *To:* Android Developers
>>>> *Subject:* [android-developers] Remote Process Question
>>>>
>>>>
>>>>
>>>> I needed to call a remote service.The service basically fetches data
>>>> from the network.I am bind the connection once,and then I unbind the
>>>> connection when the user is no more in that page.
>>>>
>>>> Everything works fine.Except that when I call the sa,e remote method for
>>>> 17th time,it just does not call the service at all.It neither throws the
>>>> DeadObjecti Exception.I have run out of ideas.Is there anything that I may
>>>> be missing.
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
>
> --
> 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] Re: Remote Process Question

2009-09-15 Thread for android
any-one?

On Tue, Sep 15, 2009 at 3:14 PM, for android  wrote:

> <>
>
> This happens even before I unbind
>
> < could be>>
>
> Is there any work around for this? Are you sure that there is a limitation.
>
>
> On Tue, Sep 15, 2009 at 3:08 PM, Cyril ROQUES 
> wrote:
>
>>  May be you doesn’t clean everything correctly after your unbind
>>
>> It seems to have a limitation of 16 things but I have no idea what it
>> could be
>>
>>
>>
>> *From:* android-developers@googlegroups.com [mailto:
>> android-develop...@googlegroups.com] *On Behalf Of *for android
>> *Sent:* mardi 15 septembre 2009 11:20
>> *To:* Android Developers
>> *Subject:* [android-developers] Remote Process Question
>>
>>
>>
>> I needed to call a remote service.The service basically fetches data from
>> the network.I am bind the connection once,and then I unbind the connection
>> when the user is no more in that page.
>>
>> Everything works fine.Except that when I call the sa,e remote method for
>> 17th time,it just does not call the service at all.It neither throws the
>> DeadObjecti Exception.I have run out of ideas.Is there anything that I may
>> be missing.
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Remote Process Question

2009-09-15 Thread for android
The only work around I got to know is killing the process when the method is
being called at 15th time,then it obviously started working.Is there
anything I am missing here.

On Tue, Sep 15, 2009 at 3:14 PM, for android  wrote:

> <>
>
> This happens even before I unbind
>
> < could be>>
>
> Is there any work around for this? Are you sure that there is a limitation.
>
>
> On Tue, Sep 15, 2009 at 3:08 PM, Cyril ROQUES 
> wrote:
>
>>  May be you doesn’t clean everything correctly after your unbind
>>
>> It seems to have a limitation of 16 things but I have no idea what it
>> could be
>>
>>
>>
>> *From:* android-developers@googlegroups.com [mailto:
>> android-develop...@googlegroups.com] *On Behalf Of *for android
>> *Sent:* mardi 15 septembre 2009 11:20
>> *To:* Android Developers
>> *Subject:* [android-developers] Remote Process Question
>>
>>
>>
>> I needed to call a remote service.The service basically fetches data from
>> the network.I am bind the connection once,and then I unbind the connection
>> when the user is no more in that page.
>>
>> Everything works fine.Except that when I call the sa,e remote method for
>> 17th time,it just does not call the service at all.It neither throws the
>> DeadObjecti Exception.I have run out of ideas.Is there anything that I may
>> be missing.
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Remote Process Question

2009-09-15 Thread for android
<>

This happens even before I unbind

<>

Is there any work around for this? Are you sure that there is a limitation.


On Tue, Sep 15, 2009 at 3:08 PM, Cyril ROQUES wrote:

>  May be you doesn’t clean everything correctly after your unbind
>
> It seems to have a limitation of 16 things but I have no idea what it could
> be
>
>
>
> *From:* android-developers@googlegroups.com [mailto:
> android-develop...@googlegroups.com] *On Behalf Of *for android
> *Sent:* mardi 15 septembre 2009 11:20
> *To:* Android Developers
> *Subject:* [android-developers] Remote Process Question
>
>
>
> I needed to call a remote service.The service basically fetches data from
> the network.I am bind the connection once,and then I unbind the connection
> when the user is no more in that page.
>
> Everything works fine.Except that when I call the sa,e remote method for
> 17th time,it just does not call the service at all.It neither throws the
> DeadObjecti Exception.I have run out of ideas.Is there anything that I may
> be missing.
>
>
> >
>

--~--~-~--~~~---~--~~
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] Remote Process Question

2009-09-15 Thread for android
I needed to call a remote service.The service basically fetches data from
the network.I am bind the connection once,and then I unbind the connection
when the user is no more in that page.

Everything works fine.Except that when I call the sa,e remote method for
17th time,it just does not call the service at all.It neither throws the
DeadObjecti Exception.I have run out of ideas.Is there anything that I may
be missing.

--~--~-~--~~~---~--~~
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] Other home applications breaking our app

2009-08-28 Thread for android
Hi,

Our application is being used by many users,unfortunately,when they start
the app with some desktop applications the application does not open at
all.This make users think that our app is buggy.Has this behaviour been
noticed by other developers.This is really bad for us.

Our app works perfectly fine when opened from the default Home application

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: How to know software keyboard is on screen or not?

2009-08-25 Thread for android
probably this(i have not tried it though)

android-sdk-windows-1.5_r1/docs/reference/android/view/inputmethod/InputMethodManager.html#isActive(android.view.View)



On Tue, Aug 25, 2009 at 1:33 PM, aby  wrote:

>
> Hi,
> Does anyone knows how to know current software keyboard is on screen
> or not in program?
> 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: What is the approx time taken to register as a developer and to be able to publish apps on the Android Market?

2009-08-25 Thread for android
<>
its simple 15 mins max.
<>
No.u just need to agree to the terms and conditions

On Tue, Aug 25, 2009 at 5:11 PM, soniya  wrote:

>
> Hi All
>
> What is the approx time taken to register as a developer and to be
> able to publish apps on the Android Market?
>
> Do we need to wait for any approval from google to be able to publich
> the apps once registered as a developer and a Google checkout
> merchant?
>
> Thanks in advance
> Soniya
> >
>

--~--~-~--~~~---~--~~
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] Regarding streaming files

2009-08-25 Thread for android
If  i am using the streaming API's provided by the SDK that is
mMediaPlayer.setDataSource(url);
mMediaPlayer.prepareAsync();

If we are using this and if there are some max file transfer per connection
rules set by the connection provider,does the SDK automatically take care of
such issues where in different carriers have different file transfers per
connection limit.

What i really want to know is say i have an url for a song for streaming ,do
i need to send it in chunks because of the limitations of the carrier
settings.When is the program given in the following link useful otherwise?

http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/

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: Memory problem

2009-08-06 Thread for android
How is the FasterBitMapDrawable in the Shelves different from normal
BitmapDrawable?

On Thu, Aug 6, 2009 at 2:38 PM, peter  wrote:

>
> Create a Bitmap is very consume memory
>
> On Aug 6, 2:41 pm, Rahul  wrote:
> > Hi all
> >
> > i have one big problem in android due to this my application crashesh
> > every time
> >
> > My Problem are
> >
> > 1. Bitmap memory exceed error
> > 2. Out of memory error
> >
> > somebody pls help me to solve this problem.
> >
> > thanks
> > Ranjit
> >
>

--~--~-~--~~~---~--~~
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: Getting virtual keyboard

2009-08-05 Thread for android
any help

On Wed, Aug 5, 2009 at 3:50 PM, for android  wrote:

> I wanted to get a virtual keyboard on click of a button and when the button
> takes focus.the following code works only for on focus,but does not work for
> the onClickListner.
>
> How do I get the virtual keyboard on click of a button?Any help
>
>
> ---
> final Button button = new Button(this);
>
> //button.requestFocusFromTouch();
> button.setOnFocusChangeListener(new OnFocusChangeListener(){
>
> public void onFocusChange(View view, boolean hasFocus) {
> if(hasFocus){
> final InputMethodManager imm =
> (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
> imm.showSoftInput(view, 0);
> }
>
> }
>
> });
> button.setOnClickListener(new OnClickListener() {
>
> public void onClick(View v) {
> final InputMethodManager imm =
> (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
> imm.showSoftInput(v, 0);
>
> }
>
> });
> 
>

--~--~-~--~~~---~--~~
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: Clearing the cache of your app on exit

2009-08-05 Thread for android
public static void trimCache(Context context) {
try {
File dir = context.getCacheDir();
if (dir != null && dir.isDirectory()) {
deleteDir(dir);

}
} catch (Exception e) {
// TODO: handle exception
}

}

public static boolean deleteDir(File dir) {
if (dir!=null && dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
boolean success = deleteDir(new File(dir, children[i]));
if (!success) {
return false;
}
}
}

// The directory is now empty so delete it
return dir.delete();
}

On Wed, Aug 5, 2009 at 3:46 PM, for android  wrote:

> Thanks!
>
>
> On Tue, Aug 4, 2009 at 11:04 AM, Dianne Hackborn wrote:
>
>> On Mon, Aug 3, 2009 at 12:20 AM, for android wrote:
>>
>>> i was not talking about the files which my app writes on the local file
>>> system.
>>>
>>> I was talking about the "Clear Cache" button in here "Settings --> Apps
>>> --> Manage Apps --> "My App" --> Clear Cach"
>>
>>
>> What that button does is remove all of the files YOUR application has put
>> into the cache directory.  Your code looks okay, though you should probably
>> make it recursive to take care of sub-directories.
>>
>> --
>> 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] Getting virtual keyboard

2009-08-05 Thread for android
I wanted to get a virtual keyboard on click of a button and when the button
takes focus.the following code works only for on focus,but does not work for
the onClickListner.

How do I get the virtual keyboard on click of a button?Any help


---
final Button button = new Button(this);

//button.requestFocusFromTouch();
button.setOnFocusChangeListener(new OnFocusChangeListener(){

public void onFocusChange(View view, boolean hasFocus) {
if(hasFocus){
final InputMethodManager imm =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(view, 0);
}

}

});
button.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
final InputMethodManager imm =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(v, 0);

}

});


--~--~-~--~~~---~--~~
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: Clearing the cache of your app on exit

2009-08-05 Thread for android
Thanks!

On Tue, Aug 4, 2009 at 11:04 AM, Dianne Hackborn wrote:

> On Mon, Aug 3, 2009 at 12:20 AM, for android  wrote:
>
>> i was not talking about the files which my app writes on the local file
>> system.
>>
>> I was talking about the "Clear Cache" button in here "Settings --> Apps
>> --> Manage Apps --> "My App" --> Clear Cach"
>
>
> What that button does is remove all of the files YOUR application has put
> into the cache directory.  Your code looks okay, though you should probably
> make it recursive to take care of sub-directories.
>
> --
> 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] Re: Clearing the cache of your app on exit

2009-08-03 Thread for android
i was not talking about the files which my app writes on the local file
system.

I was talking about the "Clear Cache" button in here "Settings --> Apps -->
Manage Apps --> "My App" --> Clear Cach"

Is this the right way?


public static void trimCache(Context context) {
File dir = context.getCacheDir();
if(dir!= null && dir.isDirectory()){
File[] children = dir.listFiles();
if (children == null) {
// Either dir does not exist or is not a directory
} else {
File temp;
for (int i = 0; i < children.length; i++) {
temp = children[i];
temp.delete();
}
}

}

}



On Mon, Aug 3, 2009 at 12:43 PM, Dianne Hackborn wrote:

> Delete all of your cache files.  They are your files, you can do what you
> want with them.
>
> On Sun, Aug 2, 2009 at 11:46 PM, for android  wrote:
>
>> < Apps --> Manage Apps --> "My App" --> Clear Cache>>
>>
>>
>> How do we clear this cache progrmatically?
>>
>>
>> On Sun, Jul 26, 2009 at 3:44 AM, niko001 <
>> greatbytessoftw...@googlemail.com> wrote:
>>
>>>
>>> Hi Mark,
>>>
>>> thanks for your answer.
>>>
>>> I mean the cache that the users can delete themselves by going to
>>> Settings --> Apps --> Manage Apps --> "My App" --> Clear Cache
>>>
>>> Thanks for your suggestion, I'll try it!
>>>
>>> Niko
>>>
>>>
>>> On Jul 25, 2:27 am, Mark Murphy  wrote:
>>> > niko001 wrote:
>>> > > is it possible to force thecacheof your app to clear when the user
>>> > > exits the app?
>>> >
>>> > > My app piles upcachedata (rightfully so) on each start, which is no
>>> > > longer needed once the user quits the app, so I am trying to find a
>>> > > way to forcibly clear it.
>>> >
>>> > You could try deleting the files from getCacheDir(), available on
>>> > Activity, Service, and other flavors of Context.
>>> >
>>> > On the other hand, you did not specify whichcacheyou were concerned
>>> > about...
>>> >
>>> > --
>>> > Mark Murphy (a Commons Guy)http://commonsware.com|
>>> http://twitter.com/commonsguy
>>> >
>>> > _The Busy Coder's Guide to *Advanced* Android Development_
>>> > Version 1.0 Available!
>>>
>>>
>>
>>
>>
>
>
> --
> 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] Re: Clearing the cache of your app on exit

2009-08-02 Thread for android
< Apps --> Manage Apps --> "My App" --> Clear Cache>>


How do we clear this cache progrmatically?

On Sun, Jul 26, 2009 at 3:44 AM, niko001
wrote:

>
> Hi Mark,
>
> thanks for your answer.
>
> I mean the cache that the users can delete themselves by going to
> Settings --> Apps --> Manage Apps --> "My App" --> Clear Cache
>
> Thanks for your suggestion, I'll try it!
>
> Niko
>
>
> On Jul 25, 2:27 am, Mark Murphy  wrote:
> > niko001 wrote:
> > > is it possible to force thecacheof your app to clear when the user
> > > exits the app?
> >
> > > My app piles upcachedata (rightfully so) on each start, which is no
> > > longer needed once the user quits the app, so I am trying to find a
> > > way to forcibly clear it.
> >
> > You could try deleting the files from getCacheDir(), available on
> > Activity, Service, and other flavors of Context.
> >
> > On the other hand, you did not specify whichcacheyou were concerned
> > about...
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://twitter.com/commonsguy
> >
> > _The Busy Coder's Guide to *Advanced* Android Development_
> > Version 1.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: Block list view item

2009-05-21 Thread for android
http://developer.android.com/reference/android/widget/BaseAdapter.html#isEnabled(int)

On Thu, May 21, 2009 at 2:41 PM, Muthu Kumar K.  wrote:

>
> Hi All,
> I have the list view which is having 10 Items. I want to block few
> items (Disable). How do i do this? Can any one help me?
>
> Thanks in Advance,
> Muthu Kumar K.
> >
>

--~--~-~--~~~---~--~~
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: Alarm issue.

2009-05-21 Thread for android
http://developer.android.com/reference/android/app/AlarmManager.html

setRepeating(int
type, long triggerAtTime, long interval,
PendingIntentoperation)

On Thu, May 21, 2009 at 2:00 PM, Gavin  wrote:

>
> Hi, all
>
>  I want to know how many alarms can be set in one application?
> what is the length for every interval time  that I can set?
> I need many alarms and at least 1 month interval time in my
> application. it is possible?
> 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: onActivityResult called before onRestart()

2009-05-05 Thread for android
<>

Probably you need to set the result.You have to set the result and handle
this case also in the  onActivityResult()

On Tue, May 5, 2009 at 7:57 AM, Jeremy Villalobos <
jeremyvillalo...@gmail.com> wrote:

> I am updating some code from 1.1 to run with the new SDK 1.5.  I noticed
> that onActivityResult is being called before OnRestart.
>
> If Activity A calls activity B.  Activity A goes to onPause(), then
> onStop().
> Activity B goes on... finishes and returns.
>
> Activity A starts at onActivityResultf().  So if you try to make a clean
> exit with onStop(), it will cause nullPointers when it comes back.
>
> Is this a bug ??
>
> >
>

--~--~-~--~~~---~--~~
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] SQLiteException..database is locked

2009-04-21 Thread for android
Basically I have a list page which I get from the network and cache it in
the local DB. and on list item click the details of the list is displayed

In the list page i have the refresh button which gets the latest state of
the list.I run a thread to update the list.


When the thread is running and I click on the list item,I again open the DB
to get the details of the list item.


The prob occurs when I click on the refresh button and if I immediately
click(that is when the DB operations are running) on the list item,then a
"database is locked" excpetion occurs,I have no idea as to how to solve this
exception

04-21 15:02:46.605: ERROR/AndroidRuntime(554):
android.database.sqlite.SQLiteException: database is locked
04-21 15:02:46.605: ERROR/AndroidRuntime(554): at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
04-21 15:02:46.605: ERROR/AndroidRuntime(554): at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1470)
04-21 15:02:46.605: ERROR/AndroidRuntime(554): at
android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1424)
04-21 15:02:46.605: ERROR/AndroidRuntime(554): at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:537)
04-21 15:02:46.605: ERROR/AndroidRuntime(554): at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:558)
04-21 15:02:46.605: ERROR/AndroidRuntime(554): at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:551)


I did see some of the  thread whch discussed this issue,but found no
solution on this.Could any one shed some light on it.

--~--~-~--~~~---~--~~
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: Mobile Unlocking in india

2009-04-15 Thread for android
its not possible in Vodaphone AFAIK..Only in the airtel n/w its possible

On Wed, Apr 15, 2009 at 3:28 PM, vinny.s...@gmail.com
wrote:

>
> Can any body help me unlocking the Android G1 mobile in india for the
> Vodafone Network ...
>
> can body give the APN setting to enter into the phone 
> >
>

--~--~-~--~~~---~--~~
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 giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-13 Thread for android
Thanks I got it from another thread.

Thanks Again

On Tue, Apr 14, 2009 at 10:51 AM, Xavier Ducrohet  wrote:

>
> Information about creating and using AVD is available at
> http://developer.android.com/sdk/preview/#avd
>
> Xav
>
> On Mon, Apr 13, 2009 at 10:17 PM, for android 
> wrote:
> > any one?
> >
> > On Tue, Apr 14, 2009 at 10:34 AM, for android 
> wrote:
> >>
> >> Thanks it worked !
> >>
> >> But i have another prob..I donot know how to add the AVD name?
> >>
> >> On Tue, Apr 14, 2009 at 10:10 AM, Anonymous Anonymous
> >>  wrote:
> >>>
> >>> ADT 0.9
> >>>
> >>> On Tue, Apr 14, 2009 at 10:00 AM, for android 
> >>> wrote:
> >>>>
> >>>> When I give the path in Eclipse for the SDK 1.5,it gives the error
> >>>> message no android.jar found.
> >>>>
> >>>> When i gave the path as the
> >>>> ~\android-sdk-windows-1.5_pre\platforms\android-1.5 then i get the
> error
> >>>> message "tools\adb.exe" not found.
> >>>>
> >>>> How to solve this?
> >>>>
> >>>> Thanks
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >
> >
> > >
> >
>
>
>
> --
> Xavier Ducrohet
> Android Engineer, Google.
>
> >
>

--~--~-~--~~~---~--~~
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 giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-13 Thread for android
any one?

On Tue, Apr 14, 2009 at 10:34 AM, for android  wrote:

> Thanks it worked !
>
> But i have another prob..I donot know how to add the AVD name?
>
>
> On Tue, Apr 14, 2009 at 10:10 AM, Anonymous Anonymous <
> firewallbr...@googlemail.com> wrote:
>
>> ADT 0.9
>>
>>
>> On Tue, Apr 14, 2009 at 10:00 AM, for android wrote:
>>
>>> When I give the path in Eclipse for the SDK 1.5,it gives the error
>>> message no android.jar found.
>>>
>>> When i gave the path as the
>>> ~\android-sdk-windows-1.5_pre\platforms\android-1.5 then i get the error
>>> message "tools\adb.exe" not found.
>>>
>>> How to solve 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 giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-13 Thread for android
Thanks it worked !

But i have another prob..I donot know how to add the AVD name?

On Tue, Apr 14, 2009 at 10:10 AM, Anonymous Anonymous <
firewallbr...@googlemail.com> wrote:

> ADT 0.9
>
>
> On Tue, Apr 14, 2009 at 10:00 AM, for android wrote:
>
>> When I give the path in Eclipse for the SDK 1.5,it gives the error message
>> no android.jar found.
>>
>> When i gave the path as the
>> ~\android-sdk-windows-1.5_pre\platforms\android-1.5 then i get the error
>> message "tools\adb.exe" not found.
>>
>> How to solve 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 giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-13 Thread for android
When I do a click on update on my previous version of ADT,I get a message
that there are no updates

On Tue, Apr 14, 2009 at 10:04 AM, Xavier Ducrohet  wrote:

>
> You are still using ADT 0.8 which is not compatible with Android 1.5 SDK.
> Please install ADT 0.9
>
> Xav
>
> On Mon, Apr 13, 2009 at 9:30 PM, for android  wrote:
> > When I give the path in Eclipse for the SDK 1.5,it gives the error
> message
> > no android.jar found.
> >
> > When i gave the path as the
> > ~\android-sdk-windows-1.5_pre\platforms\android-1.5 then i get the error
> > message "tools\adb.exe" not found.
> >
> > How to solve this?
> >
> > Thanks
> >
> > >
> >
>
>
>
> --
> Xavier Ducrohet
> Android Engineer, Google.
>
> >
>

--~--~-~--~~~---~--~~
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] Problem with giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-13 Thread for android
When I give the path in Eclipse for the SDK 1.5,it gives the error message
no android.jar found.

When i gave the path as the
~\android-sdk-windows-1.5_pre\platforms\android-1.5 then i get the error
message "tools\adb.exe" not found.

How to solve 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] Question on Intent WEB_SEARCH

2009-04-12 Thread for android
I am using the following code snippet for searching through Google

Intent intent = new Intent();
intent.setAction(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY,"searchString")
startActivity(intent);

Is there any way I can specify through the intents that i want to open new
browser window everytime I trigger this intent.

--~--~-~--~~~---~--~~
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: Restoring the active Activity while resuming the application

2009-04-09 Thread for android
I am not sure whether you will get different results in the device.

It will behave the same way AFAIK.


When ever home button is pressed your Child activity is being
finished...There is no way it will behave differently on the device.

On Thu, Apr 9, 2009 at 12:35 PM, Omer Saatcioglu wrote:

>
> Actually, this code is a work around to get rid of the problem.
> However; I think I found the root cause of my problem at
> stackoverflow.com. I asked the same question and they told me that
> there is a bug in emulator:
> http://code.google.com/p/android/issues/detail?id=2373
>
> I think that all I need to do right now is clean the save/restore
> state codes from my project and run the signed copy directly on my
> device.
>
> Thank your for your kind help.
>
>
> On Apr 9, 8:58 am, for android  wrote:
> > you are finishing the activity onPause..hence you are getting such
> results.
> >
> > @Override
> > protected void onPause(){
> > super.onPause();
> > if(SMBGuesstheNumber.isGameStarted)
> > {
> > savetheGame();
> > }
> > CtrlMaintanence ctrlMaintanence= new CtrlMaintanence();
> > ctrlMaintanence.savetheGame();
> > *finish();*
> > }
> >
> > if you need to do any wrk while the activity is finishing then use
> > isFinishing() method
> >
> > On Thu, Apr 9, 2009 at 11:10 AM, Omer Saatcioglu  >wrote:
> >
> >
> >
> >
> >
> > > On Apr 7, 8:22 pm, Marco Nelissen  wrote:
> > > > On Tue, Apr 7, 2009 at 10:04 AM, Omer Saatcioglu <
> osaatcio...@gmail.com>
> > > wrote:
> >
> > > > > Hello all,
> >
> > > > > I have two activities running: MainActivity and ChildActivity.
> > > > > Whenever the user clicks in the button in MainActivity, the
> > > > > ChildActivity is launched. What I want to do is this:
> >
> > > > > When the active activity is the ChildActivity and the user clicks
> the
> > > > > home button then relaunch the application (like opening from the
> > > > > beginning), I want to see the ChildActivity instead of MainActivity
> > > > > that is launched. However; This is happening only when the user
> clicks
> > > > > from recent activities window. (the window opened when you long
> press
> > > > > the home button)
> >
> > > > It should already be doing what you want it to do, unless you have
> > > > something in your manifest that specifically makes it not do this.
> > > > What does your AndroidManifest.xml look like?
> >
> > > hello Mark,
> >
> > > Thank you for the interest. the following is my AndroidManifest.xml.
> > > The MainActivity is GfxMain and ChildActivity is GfxGuesstheNumber
> >
> > > http://schemas.android.com/apk/res/android";
> > >  package="com.saatcioglu.android.guessthenumber"
> > >  android:versionCode="5"
> > >  android:versionName="0.5">
> > >
> > >
> > >
> > > > >  android:label="@string/app_name">
> > >
> > >
> > > > > android:name="android.intent.category.LAUNCHER" />
> > >
> > >
> > > > >  android:label="@string/app_name">
> > >
> > > > >  android:label="Guess the Number Prefs">
> > >
> > > > >  android:label="Guess the Number Prefs">
> > >
> > >
> > > 
> >
> > > you can find all the code athttp://code.google.com/p/guessthenumber/
> >
>

--~--~-~--~~~---~--~~
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: Java Application and Native Library Integration

2009-04-08 Thread for android
http://*groups*.google.com/group/*android*-*ndk*

On Thu, Apr 9, 2009 at 11:46 AM, Yogi  wrote:

>
> I am not able to find android-ndk group.
> Can you please send us the link.
>
> - Yogi
>
> On Apr 9, 9:23 am, Dianne Hackborn  wrote:
> > Native code is not currently supported for third party apps.  If this is
> > something you are interested, you might want to follow the android-ndk
> > group.
> >
> >
> >
> > On Wed, Apr 8, 2009 at 8:24 PM, scs sek  wrote:
> >
> > > Hi All,
> >
> > > I have developed bluetooth application where native library will be
> > > initiated by Java application (using JNI wrapper).
> > > JNI will call the entry function of the native library and then it
> > > will create Pthread to for scanning the device. Once Scanning is over,
> > > i will get the callback which i registered during the entry function
> > > of the native lib (called by app).
> >
> > > But i havent received the callback, but if i run the same native
> > > library in the shell (executable from the shell terminal) it is
> > > working fine.
> >
> > > Can any one help me, if there is any specific architecture needs to
> > > follow while developing Java application based on native lib?
> >
> > > Thanks in Advance.
> >
> > > Thanks & Regards,
> > > SCS
> >
> > --
> > 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] Re: How to use AutoCompleteTextView with SimpleCursorAdapter

2009-04-08 Thread for android
<>


There is also an example in the APi demos with the
contacts.~/android-sdk-windows-1.1_r1/samples/ApiDemos/src/com/example/android/apis/view/AutoComplete4.java

On Thu, Apr 9, 2009 at 2:32 AM, Paul Moore  wrote:

> Hello,
>
> I have an application that involves reading a text dictionary file with
> about 7000 entries, and allowing the user to choose one of these. My first
> approach was to allow the user to select one of these by using a
> AutoCompleteTextView together with ArrayAdapter. This works, but is
> very slow (~10 seconds to update the word list each time the user enters a
> character to narrow down the choice).
>
> I was wondering how to rework it so that I could use a database using a
> SimpleCursorAdapter instead. In other words, to hope that a SQL database
> could provide a more efficient ordering and access for the elements.
> Is this the best way to do it? I've also seen several references to
> SQLiteDatabase, but don't know which one to use.
>
> I found this code fragmant consisting of an extended SimpleAdapter.
> http://sacoskun.blogspot.com/2008/08...leadapter.html
>
> Unfortunately, this is not a complete worked out example. Could someone
> forward me a more complete example? I've found lots of code fragments, but
> no code that shows how to initialise the SimpleCursorAdapter contents, or
> how it works together with the AutoCompleteTextView.
>
> Many thanks,
> Paul
> >
>

--~--~-~--~~~---~--~~
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 determine when a ScrollView has reached the bottom

2009-04-08 Thread for android
Not sure about ur use-case...You might want to do that...

But if you want to do something when the scroll position has changed then
onScrollChanged is your friend

On Thu, Apr 9, 2009 at 11:08 AM, nwmotog...@gmail.com
wrote:

>
> so you are suggesting that I create a custom ScrollView?
>
> On Apr 8, 10:33 pm, for android  wrote:
> > View.onScrollChanged
> >
> > On Thu, Apr 9, 2009 at 10:53 AM, nwmotog...@gmail.com
> > wrote:
> >
> >
> >
> >
> >
> > > I have a TextView inside a ScrollView and I have loaded it with a
> > > bunch of text.  When the ScrollView gets to the bottom/top I would
> > > like to load the TextView with new data BUT there doesn't appear to be
> > > any way to find out when you have reached either location.  Could some
> > > one help me out with this?  How can this be done?
> >
>

--~--~-~--~~~---~--~~
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: Restoring the active Activity while resuming the application

2009-04-08 Thread for android
you are finishing the activity onPause..hence you are getting such results.

@Override
protected void onPause(){
super.onPause();
if(SMBGuesstheNumber.isGameStarted)
{
savetheGame();
}
CtrlMaintanence ctrlMaintanence= new CtrlMaintanence();
ctrlMaintanence.savetheGame();
*finish();*
}


if you need to do any wrk while the activity is finishing then use
isFinishing() method


On Thu, Apr 9, 2009 at 11:10 AM, Omer Saatcioglu wrote:

>
> On Apr 7, 8:22 pm, Marco Nelissen  wrote:
> > On Tue, Apr 7, 2009 at 10:04 AM, Omer Saatcioglu 
> wrote:
> >
> > > Hello all,
> >
> > > I have two activities running: MainActivity and ChildActivity.
> > > Whenever the user clicks in the button in MainActivity, the
> > > ChildActivity is launched. What I want to do is this:
> >
> > > When the active activity is the ChildActivity and the user clicks the
> > > home button then relaunch the application (like opening from the
> > > beginning), I want to see the ChildActivity instead of MainActivity
> > > that is launched. However; This is happening only when the user clicks
> > > from recent activities window. (the window opened when you long press
> > > the home button)
> >
> > It should already be doing what you want it to do, unless you have
> > something in your manifest that specifically makes it not do this.
> > What does your AndroidManifest.xml look like?
>
> hello Mark,
>
> Thank you for the interest. the following is my AndroidManifest.xml.
> The MainActivity is GfxMain and ChildActivity is GfxGuesstheNumber
>
> http://schemas.android.com/apk/res/android";
>  package="com.saatcioglu.android.guessthenumber"
>  android:versionCode="5"
>  android:versionName="0.5">
>
>
>
>  android:label="@string/app_name">
>
>
> android:name="android.intent.category.LAUNCHER" />
>
>
>  android:label="@string/app_name">
>
>  android:label="Guess the Number Prefs">
>
>  android:label="Guess the Number Prefs">
>
>
> 
>
> you can find all the code at http://code.google.com/p/guessthenumber/
> >
>

--~--~-~--~~~---~--~~
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 of request codes - their names and values?

2009-04-08 Thread for android
The requestCode is the constant you send from ur code which starts the
activity

startActivityForResult(intent,100);


So you are sending the code 100.

you need to look at the result code which are RESULT_OK,RESULT_CANCELED
which are defined in the Activity class.

On Thu, Apr 9, 2009 at 7:09 AM, Rob Franz  wrote:

>
> Hi all
> I just can't seem to find this anywhere... I've been googling!
>
> I have a RingtonePreference in one of my classes and, upon return, the
> onActivityResult says that the requestCode being returned is 100.
>
> Unfortunately, I can't seem to find the *constant name* for this
> value.
>
> Is there a master list somewhere?  It's just not jumping out at me in
> the documentation...
>
> Thanks
> Rob
> >
>

--~--~-~--~~~---~--~~
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 determine when a ScrollView has reached the bottom

2009-04-08 Thread for android
View.onScrollChanged

On Thu, Apr 9, 2009 at 10:53 AM, nwmotog...@gmail.com
wrote:

>
> I have a TextView inside a ScrollView and I have loaded it with a
> bunch of text.  When the ScrollView gets to the bottom/top I would
> like to load the TextView with new data BUT there doesn't appear to be
> any way to find out when you have reached either location.  Could some
> one help me out with this?  How can this be done?
> >
>

--~--~-~--~~~---~--~~
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 find the height of HTML content displayed in a webview

2009-04-08 Thread for android
Probably these might help you... I have not tried them though..View.
getScrollX() and View.getScrollY()  and View.scrollTo(int x, int y)

On Wed, Apr 8, 2009 at 4:40 PM, Abraham
wrote:

>
> HI All,
>
> My application generates an HTML file which needs to be displayed to
> the user . For this purpose I'm using the loadData() API provided by
> Webview. This HTML file is updated every 2 secs & the same is loaded
> again using loadData() to display the updated values. On reloading the
> file the Webview starts displaying again from the top of the file
> causing the user to always scroll down to the location where he
> previously was. This causes a very bad user experience.
>
> To overcome this issue an alternative that I could think of was to
> split the file to multiple files that can exactly fit in the the
> screen. For this I need to find the height of the HTML content that
> can loaded in a web view.
>
> From the WebView documentation I found that an API getContentHeight()
> is provided for this purpose. Although this method returns me 0 on the
> first attempt. On subsequent attempt it gives me the height of the
> page that was previously loaded.
>
> I'm not able to figure out how I can use getContentHeight() api to
> give the height of the HTML content that is currently loaded.
>
> The code snippet that I'm using  is as follows
> mWebView = (WebView) findViewById(R.id.ftsWebView);
> mHTMLData = new String(readfromHTMLFile());
> mWebView.loadData(mHTMLData, mimeType, encoding);
> int contentHeight = mWebView.getContentHeight();
>
> Thanks in advance for your advice.
>
> Regards
> Abraham
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: It has been SDK 1.1r....

2009-04-07 Thread for android
you can use the reset adb when launch fails...I also run on the same
config...i find no errors

On Tue, Apr 7, 2009 at 7:32 PM, CnmJbm  wrote:

>
> It has been SDK 1.1r already, but why does Android/Eclipse IDE still
> launch the emulator or launch my application to emulator VERY
> UNRELIABLY?
>
> ALMOST 2 OF 3 launches fail !!
>
> Either the android green robot just keeps flashing, or the emulator
> only launches to Home screen and stops, without my app running.
>
> I am running XP with 1.2GHz CPU and 4GB memory.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Postion of the grouppostion or the childposition in a Expandable List.

2009-04-07 Thread for android
Found a way out.

int pos = listView.getPositionForView(v);
int grpPostion =
ExpandableListView.getPackedPositionGroup(listView.getAdapter().getItemId(pos))-1;


is this the best way to do it?

Thanks

On Tue, Apr 7, 2009 at 5:57 PM, for android  wrote:

> How do I find the postion of the item clicked in an Expandable List.
>
>
> In a list view the listView.getPositionForView(v); is present which gives
> the postion of the clicked item.
>
> But in an expandable list how do i get to know the postion of the
> grouppostion or the childposition
>
>
>
> 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] Postion of the grouppostion or the childposition in a Expandable List.

2009-04-07 Thread for android
How do I find the postion of the item clicked in an Expandable List.


In a list view the listView.getPositionForView(v); is present which gives
the postion of the clicked item.

But in an expandable list how do i get to know the postion of the
grouppostion or the childposition



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: WebView with theme doesn't show focused text field values

2009-04-05 Thread for android
Use this

webView.loadDataWithBaseURL("http://m.myspace.com";, null,
   "text/html", "utf-8", null);





On Sun, Apr 5, 2009 at 12:12 AM, Rmac  wrote:

>
> I have encountered a problem with focused text fields in a WebView not
> showing entered text values.  As long as a WebView text field has
> focus it will not show text or even the blinking cursor.  You can
> select and highlight the text or unfocus the field to see it, but when
> it gains focus it will not show the text... as if the foreground color
> of the text is white.
>
> The simplest code to demonstrate this is below.  With the setTheme
> using a Light background, try typing values into the Email text field
> to notice that the text is not visible when the field is focused.
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.webkit.WebView;
>
> public class AndTest extends Activity {
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>
>setTheme(android.R.style.Theme_Light_NoTitleBar); // <--
> causes focused text fields not to show entered text
>
>WebView webContent = new WebView(this);
>webContent.loadUrl("http://m.myspace.com";);
>
>setContentView(webContent);
>}
> }
>
>
> If the setTheme is set for a Light theme, the text in focused fields
> cannot be seen.  I also have this happening in my program without the
> theme if there are multiple Views within Views that have background
> colors, but the above code replicates the problem.
>
> Any suggestions or help is greatly appreciated.
>
> >
>

--~--~-~--~~~---~--~~
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 make a ListView adapt to dynamic element sizes?

2009-04-01 Thread for android
<>

example in api demos --- Views/Lists/6.ListAdapter Collapsed



On Wed, Apr 1, 2009 at 1:12 PM, Matthias  wrote:

>
> Hi,
>
> I am struggling over another layouting problem again. I render a
> ListView with ellipsized TextView elements, but those text views can
> expand in size when the user clicks it. The problem is: If the
> ListView doesn't already take the whole screen (e.g. because the total
> height of all visible elements is smaller than the screen height),
> then when expanding an element, the ListView's size doesn't also
> expand accordingly, still obscuring most parts of the now taller text
> view.
>
> I have tried practically everything that seemed reasonable to me to
> make the ListView get aware of the new height of its children,
> including calls to:
>
> invalidate()
> measure()
> recomputeViewAttributes(textView)
>
> on all participating views (the list view and its elements), but
> nothing works.
>
> What am I missing? How can I programmatically tell a container view to
> look at its children again in order to resize if necessary?
>
> Thanks!
> Matthias
> >
>

--~--~-~--~~~---~--~~
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: When save image, how to specify image name?

2009-03-27 Thread for android

did u try TITLE
On 3/27/09, rens...@gmail.com  wrote:
>
> Can any one help on this?
>
> On Mar 26, 6:20 pm, Ren  wrote:
>> I have the following code to save a bitmap to a jpg file. It works except
>> I
>> couldn't specify the file name.
>>
>> The image file is save in /sdcard/dcim/Camera. How do I specify a file
>> name,
>> or even the saved path?
>>
>> Cheers
>>
>> ContentValues values = new ContentValues();
>> values.put(MediaStore.Images.ImageColumns.DISPLAY_ NAME, "newpic");
>> values.put(MediaStore.Images.ImageColumns.MIME_TYP E, "image/jpeg");
>> Uri uri = getContentResolver().insert(MediaStore.Images.Medi
>> a.EXTERNAL_CONTENT_URI, values);
>>
>> try{
>> OutputStream out = getContentResolver().openOutputStream(uri);
>> bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);}catch(IOException
>> e){
>>
>> Log.e("save image", "failed to save image", e);
>>
>> }
>>
>> --
>> Kind Regards,
>> Ren
> >
>

--~--~-~--~~~---~--~~
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 Invoke Maps application from nay other application

2009-03-26 Thread for android
geo:*latitude*,*longitude*
geo:*latitude*,*longitude*?z=*zoom*
geo:0,0?q=*my+street+address*
geo:0,0?q=*business+near+city


http://developer.android.com/guide/appendix/g-app-intents.html


*
On Thu, Mar 26, 2009 at 3:27 PM, swapnil  wrote:

>
> Hello,
>
> I want to invoke the (Specifically) Android maps application from My
> own application.
>
> Is there any way by which I can do that?
>
> Thanks in Advance.
>
>
> Regards,
> Swapnil Dalal
>
>
> >
>

--~--~-~--~~~---~--~~
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: Hide a progressbar?

2009-03-26 Thread for android
in the onCreate set the Progresbar visibilty
ProgressBar.setVisibilty(View.INVISIBLE)

On Thu, Mar 26, 2009 at 12:34 PM, idev  wrote:

>
> Hi
>
> I have added an indeterminate progress bar to my view and I want it to
> be displayed when the user clicks a button.
> The problem is as soon as the activity is loaded and the intent
> displayed, the progress bar is also displayed. I have used the
> setProgressBarVisibility(true); statement in the onClick method but
> the progress bar is displayed even without the onClick.
>
> Can someone please tell me how to keep the progress bar hidden till
> the button click happens?
>
> 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: Screen Orientation.

2009-03-24 Thread for android
Does that mean from the DisplayMetrics we need to check from the height and
width?

On Wed, Mar 25, 2009 at 10:55 AM, Dianne Hackborn wrote:

> That returns the orientation mode your activity has requested.  The actual
> current orientation is in getResources().getDisplayMetrics().
>
> On Tue, Mar 24, 2009 at 10:01 PM, for android wrote:
>
>> getRequestedOrientation()
>>
>>
>> On Wed, Mar 25, 2009 at 9:34 AM, Suman  wrote:
>>
>>>
>>> Hi all...
>>>
>>>
>>>Thanks for replies. Can any one tell me by which
>>> method i can check the screen orientation? I mean i want to check
>>> whether it is land-scap mode or portrait mode. Thanks in advance.
>>>
>>>
>>> Suman.
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> 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.  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] Re: Screen Orientation.

2009-03-24 Thread for android
getRequestedOrientation()

On Wed, Mar 25, 2009 at 9:34 AM, Suman  wrote:

>
> Hi all...
>
>
>Thanks for replies. Can any one tell me by which
> method i can check the screen orientation? I mean i want to check
> whether it is land-scap mode or portrait mode. Thanks in advance.
>
>
> Suman.
>
> >
>

--~--~-~--~~~---~--~~
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: Ringtone picker -- how to get return value from EXTRA_RINGTONE_PICKED_URI

2009-03-20 Thread for android
>From your onActivityResult

Uri uri = data

.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);

On Mon, Mar 16, 2009 at 12:50 PM, Ed99  wrote:

>
> So I'm having trouble getting the return value from the
> RingtonManager's ACTION_RINGTONE_PICKER activity... I'm sorry if
> I'm just missing something basic ( I probably am... ), but I've
> searched around and nothing I've found worked..
>
> The activity I'm launching is this :
>
> http://developer.android.com/reference/android/media/RingtoneManager.html#ACTION_RINGTONE_PICKER
>
> I have no problem launching the activity, or getting my
> onActivityResult code to run after the activity is closed. I just
> can't seem to find the Uri of the ringtone they picked!
>
> From the docs it looks like the picked Uri should be in
> EXTRA_RINGTONE_PICKED_URI (
>
> http://developer.android.com/reference/android/media/RingtoneManager.html#EXTRA_RINGTONE_PICKED_URI
> )
>
> In my onActivityResult code, I am trying to get this value from the
> data intent as:
>
>  String ringstring = data.getStringExtra
> (RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
>
> However this string is always null   I've tried looking at the
> data object in the debugger and there doesn't seem to be any Uri
> hidden in it that I can see...Am I going about getting this value
> correctly? At first I thought I could just access it directly ( ie,
> Uri uri = RingtoneManager.EXTRA_RINGTONE_PICKED_URI ), but that is
> just a constant 'android.intent.extra.ringtone.PICKED_URI'
>
> Maybe there is a permission I am missing? I looked at the list and
> nothing seemed associated with ringtones though...  I also tried
> passing in the input parameters to no avail ( it seems like they are
> defaulted anyway, so I don't think that is the issue)..
>
>
> For reference, here's how I launch the activity
>
> Intent i = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
> startActivityForResult( i,1);
>
>
> Any insight would be greatly appreciated!
>
> >
>

--~--~-~--~~~---~--~~
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: Performance Problem with ListView / Styled TextView

2009-03-20 Thread for android
i was trying to tell you use the ViewHolder pattern as in the list
demos...and just added that you can use TwoLineListItem instead of creating
your own..

On Fri, Mar 13, 2009 at 1:15 AM, Mariano Kamp wrote:

> Hi forandroid,
>
>   I guess you're talking about the class TwoLineListItem [1], right? Out of
> curiosity, not because I am trying to be a smart ass: Why would this be
> faster?
>
> Cheers,
> Mariano
>
> [1]
> http://developer.android.com/reference/android/widget/TwoLineListItem.html
>
>
> On Wed, Jan 14, 2009 at 10:51 AM, for android wrote:
>
>> use the efficient list adapter
>>
>> And also you can use the TwoLineListitem
>>
>>
>> On Wed, Jan 14, 2009 at 2:23 PM, Mariano Kamp wrote:
>>
>>> *bump* ;-)
>>>
>>>
>>> On Sun, Jan 11, 2009 at 7:10 PM, Mariano Kamp wrote:
>>>
>>>> Hi,
>>>>   I have a performance problem in a ListView. The problem seems to be
>>>> that it takes too long to setup each individual row. It scrolls very, very
>>>> painfully slow, because of that.
>>>>
>>>>   The actual code renders an Entry differently depending on the read
>>>> state and if it is changed. When not using this code and just plainly 
>>>> called
>>>> setText() on the TextViews it is reasonable fast.  Also the content is 
>>>> HTML.
>>>>
>>>>   Am I doing something terribly wrong here?
>>>>
>>>>
>>>> 
>>>> http://schemas.android.com/apk/res/android";
>>>>  android:layout_width="fill_parent" android:layout_height=
>>>> "wrap_content">
>>>>
>>>> >>> "fill_parent"
>>>>  android:layout_height="wrap_content" android:textSize="11sp"
>>>>  android:paddingTop="3px" />
>>>>  >>> "fill_parent"
>>>>  android:layout_height="wrap_content" android:layout_below=
>>>> "@id/feed_title"
>>>>  android:textSize="15sp" android:paddingBottom="3px" />
>>>> 
>>>>
>>>> class EntryListAdapter extends BaseAdapter {
>>>>
>>>>  [..]
>>>>
>>>> public View getView(int position, View convertView, ViewGroup parent) {
>>>>  View rowView = convertView != null ? convertView : activity
>>>>  .findViewById(R.layout.entry_row);
>>>>
>>>>  if (rowView == null)
>>>> rowView = inflater.inflate(R.layout.entry_row, parent, false);
>>>>
>>>> Entry entry = entries.get(position);
>>>>  --> slow version
>>>> EntryViewHelper.populateEntryView(rowView, entry);
>>>>  <--
>>>>  -- OR --
>>>>  --> (somewhat) fast version
>>>>  TextView entryTitleView = (TextView) rowView.findViewById(R.id.
>>>> entry_title);
>>>>  TextView feedTitleView = (TextView) rowView.findViewById(R.id.
>>>> feed_title);
>>>>
>>>>
>>>>  feedTitleView.setText(entry.getFeedTitle());
>>>> entryTitleView.setText(entry.getTitle());
>>>>  <--
>>>> return rowView;
>>>>  }
>>>> }
>>>>
>>>> class EntryViewHelper {
>>>>  [..]
>>>>
>>>> static void populateEntryView(View view, Entry entry) {
>>>>
>>>> TextView entryTitleView = (TextView) view
>>>> .findViewById(R.id.entry_title);
>>>>  TextView feedTitleView = (TextView) view.findViewById(R.id.feed_title
>>>> );
>>>>
>>>> feedTitleView.setText(U.renderTitleToSpannedString(
>>>> entry.getFeedTitle(), entry.getFeedTitleType()));
>>>>  entryTitleView.setText(U.renderTitleToSpannedString(entry.getTitle(),
>>>> entry.getTitleType()));
>>>>
>>>> int style = Typeface.NORMAL;
>>>>  if (!entry.isRead())
>>>> style |= Typeface.BOLD;
>>>>  if (entry.isReadStatePending())
>>>> style |= Typeface.ITALIC;
>>>>
>>>> entryTitleView.setText(U.renderTitleToSpannedString(entry.getTitle(),
>>>> entry
>>>>  .getTitleType()));
>>>> feedTitleView.setText(U.renderTitleToSpannedString(
>>>> entry.getFeedTitle(), entry.getFeedTitleType()));
>>>>
>>>> entryTitleView.setTypeface(Typeface.DEFAULT, style);
>>>>  }
>>>> }
>>>>
>>>> ..
>>>> import android.text.Html;
>>>> import android.text.Spanned;
>>>> import android.text.SpannedString;
>>>> ..
>>>> class U {
>>>> static Spanned renderTitleToSpannedString(String titleString,
>>>>  String titleType) {
>>>> Spanned title = null;
>>>>  if ("html".equals(titleType) || "xhtml".equals(titleType))
>>>>  title = Html.fromHtml(titleString);
>>>> else
>>>>  title = new SpannedString(titleString);
>>>> return title;
>>>>  }
>>>> }
>>>>
>>>>   Btw. I re-use the convert view etc. The performance degradation only
>>>> happens when I style the output.
>>>>
>>>> Cheers,
>>>> Mariano
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: HTML login form works in Android browser and fails with WebView ?

2009-03-04 Thread for android
webView = (WebView) findViewById(R.id.webView);
String url = "http://www.flickr.com/";;
webView.setWebViewClient(new AuthWebViewClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadsImagesAutomatically(true);
webView.loadUrl(url);

private class AuthWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}

>From this i could open multiple windows in the same webview

i think thats what you are trying to acheive

On Wed, Mar 4, 2009 at 4:44 PM, Derek  wrote:

>
> Thanks but the problem is still here. However, If i remove:
> webview.setWebViewClient(new AuthWebViewClient());
> then I notice that with setSupportMultipleWindows(true); it opens a
> new Android browser windows when I click to "Submit" button but the
> page displayed is not the correct one. I'm wondering if Flickr is able
> to check that the HTML is loaded into a WebView or a real browser (as
> for in iFrame). I don't see how because there is no JavaScript in the
> HTML.
>
> Any other suggestions ?
>
>
> On Mar 4, 8:30 am, for android  wrote:
> > webView.getSettings().setSupportMultipleWindows(true);
> >
> > On Wed, Mar 4, 2009 at 2:19 AM, Derek  wrote:
> >
> > > Yeah, thanks ! I was using layout_weight="1.0". I've removed it and
> > > now the links are working. However, the login form still doesn't work
> > > as in Android browser.
> > > When I look to the source it seems very simple (No JavaScript). Some
> > > form fields are hidden and empty. Could it be the problem ?
> >
> > > Here is my XML:
> > > 
> > > http://schemas.android.com/apk/res/
> > > android"
> > >android:layout_width="fill_parent"
> > >android:layout_height="fill_parent"
> > >android:orientation="vertical">
> >
> > > > >android:layout_height="wrap_content"
> > >android:text="@string/flickr_authwebview_title_label"
> > > android:layout_marginBottom="6px"/>
> >
> > > > >android:layout_width="wrap_content"
> > >android:layout_height="wrap_content"
> > >android:layout_gravity="center">
> >
> > > > >
>  android:text="@string/flickr_authwebview_ok_button"
> > >android:layout_marginRight="10px"
> > >android:layout_marginTop="6px"
> > >android:layout_width="wrap_content"
> > >android:layout_height="wrap_content" />
> >
> > > android:id="@+id/flickr_authwebview_button_cancel"
> >
> > >  android:text="@string/flickr_authwebview_cancel_button"
> > >android:layout_marginLeft="10px"
> > >android:layout_marginTop="6px"
> > >android:layout_width="wrap_content"
> > >android:layout_height="wrap_content" />
> >
> > >
> >
> > > > >android:id="@+id/flickr_authwebview"
> > >android:layout_width="fill_parent"
> > >android:layout_height="fill_parent"
> > >/>
> >
> > > 
> >
> > > and my code:
> > > String url = "http://m.flickr.com/signin/";;
> > > WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
> > > webview.setWebViewClient(new AuthWebViewClient());
> > > webview.getSettings().setJavaScriptEnabled(true);
> > > webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
> > > webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
> > > webview.loadUrl(url);
> > > webview.setClickable(true);
> > > webview.requestFocus();
> >
> > >private class AuthWebViewClient extends WebViewClient
> > >{
> > >@Override
> > >public boolean shouldOverrideUrlLoading(WebView view, String
> > > url)
> > >{
> > >view.loadUrl(url);
> > >return true;
> > >}
> > >}
> >
> > 

[android-developers] Re: HTML login form works in Android browser and fails with WebView ?

2009-03-03 Thread for android
webView.getSettings().setSupportMultipleWindows(true);

On Wed, Mar 4, 2009 at 2:19 AM, Derek  wrote:

>
> Yeah, thanks ! I was using layout_weight="1.0". I've removed it and
> now the links are working. However, the login form still doesn't work
> as in Android browser.
> When I look to the source it seems very simple (No JavaScript). Some
> form fields are hidden and empty. Could it be the problem ?
>
> Here is my XML:
> 
> http://schemas.android.com/apk/res/
> android"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent"
>android:orientation="vertical">
>
>android:layout_height="wrap_content"
>android:text="@string/flickr_authwebview_title_label"
> android:layout_marginBottom="6px"/>
>
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_gravity="center">
>
>android:text="@string/flickr_authwebview_ok_button"
>android:layout_marginRight="10px"
>android:layout_marginTop="6px"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content" />
>
>
>  android:text="@string/flickr_authwebview_cancel_button"
>android:layout_marginLeft="10px"
>android:layout_marginTop="6px"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content" />
>
>
>
>android:id="@+id/flickr_authwebview"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent"
>/>
>
> 
>
> and my code:
> String url = "http://m.flickr.com/signin/";;
> WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
> webview.setWebViewClient(new AuthWebViewClient());
> webview.getSettings().setJavaScriptEnabled(true);
> webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
> webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
> webview.loadUrl(url);
> webview.setClickable(true);
> webview.requestFocus();
>
>
>private class AuthWebViewClient extends WebViewClient
>{
>@Override
>public boolean shouldOverrideUrlLoading(WebView view, String
> url)
>{
>view.loadUrl(url);
>return true;
>}
>}
>
> Thanks for any help.
>
>
> On Mar 3, 11:40 am, for android  wrote:
> > Are you using weight in your webview..there are errors if the webview has
> a
> > layout_weight="1.0"
> >
> > On Mon, Mar 2, 2009 at 8:44 PM, Derek  wrote:
> >
> > > Anyone ?
> > > Even simple links are not followed.
> > > - Show quoted text -
> >
> > > On Mar 1, 9:08 pm, Derek  wrote:
> > > > To get the login form, use:
> > > > String url = "http://m.flickr.com/signin/";;
> >
> > > > On Mar 1, 9:03 pm, Derek  wrote:
> >
> > > > > Hi all,
> >
> > > > > I'm facing the following problem. I'm opening Flickr HTML login
> form
> > > > > with default Android browser and everything works fine when I'm
> > > > > logging (click "sign in" button in HTML form):
> > > > >  String url = "http://m.flickr.com/";;
> > > > >  Intent intent = new Intent();
> > > > >  intent.setAction(Intent.ACTION_VIEW);
> > > > >  intent.setData(Uri.parse(url));
> > > > >  startActivity(intent);
> >
> > > > > But "sign in" button does nothing when using the same in a WebView:
> > > > > String url = "http://m.flickr.com/";;
> > > > >  WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
> > > > >  webview.getSettings().setJavaScriptEnabled(true);
> > > > >
>  webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
> > > > >  webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
> > > > >  webview.getSettings().setLoadsImagesAutomatically(false);
> > > > >  webview.setClickable(true);
> > > > >  webview.loadUrl(url);
> >
> > > > > What could be the problem ?
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: HTML login form works in Android browser and fails with WebView ?

2009-03-03 Thread for android
Are you using weight in your webview..there are errors if the webview has a
layout_weight="1.0"

On Mon, Mar 2, 2009 at 8:44 PM, Derek  wrote:

>
> Anyone ?
> Even simple links are not followed.
> - Show quoted text -
>
>
> On Mar 1, 9:08 pm, Derek  wrote:
> > To get the login form, use:
> > String url = "http://m.flickr.com/signin/";;
> >
> > On Mar 1, 9:03 pm, Derek  wrote:
> >
> > > Hi all,
> >
> > > I'm facing the following problem. I'm opening Flickr HTML login form
> > > with default Android browser and everything works fine when I'm
> > > logging (click "sign in" button in HTML form):
> > >  String url = "http://m.flickr.com/";;
> > >  Intent intent = new Intent();
> > >  intent.setAction(Intent.ACTION_VIEW);
> > >  intent.setData(Uri.parse(url));
> > >  startActivity(intent);
> >
> > > But "sign in" button does nothing when using the same in a WebView:
> > > String url = "http://m.flickr.com/";;
> > >  WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
> > >  webview.getSettings().setJavaScriptEnabled(true);
> > >  webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
> > >  webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
> > >  webview.getSettings().setLoadsImagesAutomatically(false);
> > >  webview.setClickable(true);
> > >  webview.loadUrl(url);
> >
> > > What could be the problem ?
> >
>

--~--~-~--~~~---~--~~
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: Pick multiple contacts from the contacts application

2009-03-01 Thread for android
i saw the source code and i dont think there is a way to pick multiple
contacts

On Mon, Mar 2, 2009 at 1:31 AM, Sanjay  wrote:

>
> Were you able to figure out how to pick multiple contacts from the
> addressbook? Is there a way to do it anyone? I'm using
> Intent.ACTION_GET_CONTENT to pick one contact but don't know if it's
> possible to pick multiple contacts.
>
> On Feb 17, 5:20 am, for android  wrote:
> > Is there any Intent for picking multiple contacts from the
> > Intent.ACTION_PICK?If yes whats the data that needs to be passed to the
> > intent?
> >
> > 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: How to implement Ticker

2009-02-26 Thread for android
http://developer.android.com/guide/samples/ApiDemos/res/layout/marquee.html


On Thu, Feb 26, 2009 at 1:01 PM, ANKIT SOMANI wrote:

> Hi ,
>
> I would like to implement a ticker in my application but, I cant find
> Ticker in Android SDK 1.0.
> I tried marquee in latest release but it work only on focus.
>
>  Please Help If any one have done this before.
>
>
> Thanks in Advance.
>
> Regards
> ~Ankit Somani
>
>
> >
>

--~--~-~--~~~---~--~~
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: expandable list

2009-02-26 Thread for android
ExpandableListView.collapseGroup (int groupPos) and expandGroup (int
groupPos)
On Thu, Feb 26, 2009 at 5:51 PM, Dilli  wrote:

>
> Hi all,
>
> I am developing a simple application
>
> in that i am using a simple expandable list.
> how can i set the list will be always opened (expanded).
>
> Need help
>
> Thank You
> Dilli
> >
>

--~--~-~--~~~---~--~~
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: Invalidates the TabView

2009-02-25 Thread for android
you need to use notifyDataChanged on the list.

On Wed, Feb 25, 2009 at 12:57 PM, ericsk  wrote:

>
> Hi,
>
> I have a problem on TabActivity's invalidation.
> There're few tabs in my TabActivity, and each tab binds a ListView.
> Each Listview binds an ArrayAdapter that bound an ArrayList.
>
> While the TabChanged ( in onTabChanged handler ), I modify an
> ArrayList with a thread. However, while the thread ends and the
> ArrayList was also modified, the listview doesn't refresh its content
> even if I call getTabHost().getCurrentTabView().invalidate().
>
> Is there any suggestion on this problem? 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: how to switch between two views

2009-02-20 Thread for android
Use the ViewFlipper.

onCreate will be run once.After which the UI will be displayed.

On Fri, Feb 20, 2009 at 6:19 PM, guptha  wrote:

>
>
> Can we  use Handler to accomplish this task.
>
>
>
>
> On Feb 19, 11:12 pm, "nEx.Software"  wrote:
> > I also think the Thread.sleep(500); is stopping the redraw from
> > happening.
> >
> > On Feb 19, 11:06 am, "nEx.Software"  wrote:
> >
> > > I think onCreate runs all the way through before displaying the UI.
> > > I just tried this and found it to be the case.
> >
> > > On Feb 18, 9:37 pm, guptha  wrote:
> >
> > > > hi friends,
> > > > I 'm beginner in Android ,To start with i was asked to do a simple
> > > > task ,i need to make blue and red screen appear on the screen
> > > > alternatively ,
> > > > to achieve this i wrote two layout files
> > > > 1.  main.xml -- for to display red screen
> > > > 2.  sub1.xml -- for to display blue screen
> >
> > > > In oncreate() i wrote
> >
> > > >  for(int i=0;i<20;i++)
> > > >{
> > > > setContentView(R.layout.main);
> > > >  try
> > > >   {
> > > > Thread.sleep(500);
> > > >   }catch(Exception e){}
> > > >   setContentView(R.layout.sub1);
> > > >}
> >
> > > > but this doesn't work ,why ?
> > > > Please help to understand the concept
> >
>

--~--~-~--~~~---~--~~
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 I get the child of a Widget

2009-02-20 Thread for android
you have declared the id as childWidget

and u try to access it by childWidgete..hence the NPE

On Fri, Feb 20, 2009 at 1:48 PM, Meryl Silverburgh <
silverburgh.me...@gmail.com> wrote:

>
> Hi,
>
> In my layout.xml, I have a child Widget under my custom widget "MyWidget"
>
> My question is in my java code of my parent widget ("MyWidget"), how
> can I get a reference to the child Widget ("MyChildWidget")?
>
>
>
>   android:layout_width="fill_parent"
>android:layout_height="wrap_content"
>>
>android:orientation="vertical"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent">
>
>android:layout_width="fill_parent"
>android:layout_height="wrap_content"
>android:gravity="bottom"
>/>
>
>
>
>
> I have tried this, but I get a null pointer:
>  MyChildWidget childWidget = (MyChildWidget)
> this.findViewById(R.id.childWidgete);
>
>if (childWidget != null) {
>
> } else {
> // always get here...
>
> }
>
> >
>

--~--~-~--~~~---~--~~
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: WebView loadData and XML Parsing Question

2009-02-19 Thread for android
I am trying to show a html string such as

sample3 ="Link texthttp://www.isical.ac.in/~clia/images/google_logo.jpg>";

webView.loadDataWithBaseURL("www.company.com",sample3 , "text/html",
"utf-8", "www.companyfailed.com");

When this webview is displayed then i am not able to see the image in the
sample3 string.


How do i acheive that?



On Thu, Feb 19, 2009 at 3:01 PM, forandroid  wrote:

>
> I have to display html content which i get from am xml(RSS feed).I am
> using the loadDataWithBaseURL .
>
> But if the the html content contains an image,how do i render the
> image in the webview as in the html content.
>
>
> webView.loadDataWithBaseURL("www.company.com",descHtmlString, "text/
> html", "utf-8", "www.companyfailed.com");
>
>
>
>
> On Jan 13, 1:30 pm, Ryan  wrote:
> > > I'm guessing it was the first suggestion, not the other two.
> >
> > Actually, they were such simple changes I made both at once. E.G. I
> > used "UTF-8", instead of "utf-8". And I switched to the
> > loadDataWithBaseURL function. The variable html was always a String so
> > no change there.
> >
> > I'm guessing it's the loadDataWithBaseURL function that did the trick,
> > but I will try both suggestions in isolation just to make sure.
> >
> > I'd rather not use the loadDataWithBaseURL to load local data if I can
> > help it, so I'll continue researching a fix for the loadData function.
> >
> > Thanks for your help.
> >
> > On Jan 12, 10:42 pm, Mark Murphy  wrote:
> >
> > > Ryan wrote:
> > > > Wow.. thanks Mark, that fixed it!
> >
> > > I'm guessing it was the first suggestion, not the other two.
> >
> > > > Do you know why that works, seems an odd way to get it to work??
> >
> > > It is definitely odd. However, it seems to cure a lot of ills, ills
> that
> > > I presume come from some issues with the implementation of the simpler
> > > loadData() method. I need to look at the source for that sometime...
> >
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > _The Busy Coder's Guide to Android Development_ Version 2.0 Published!
> >
>

--~--~-~--~~~---~--~~
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: reduce height of a button

2009-02-19 Thread for android
style="?android:attr/buttonStyleSmall"

On Thu, Feb 19, 2009 at 5:18 PM, schtieF  wrote:

>
> sorry its so easy
>
> android:layout_height="35px"
>
> but it does not look good, because the button gets cut off on top and
> you dont see any round edges anymore
>
> schtieF
>
> On 19 Feb., 12:41, schtieF  wrote:
> > the label can be centered with android:gravity="center_horizontal"
> >
> > but i dont know how to reduce the height, anyone else can help?
> >
> > On 15 Jan., 22:54, "info.sktechnol...@gmail.com"
> >
> >  wrote:
> > > What is the preferred way to reduce theheightof abuttonand
> > > maintain the label in the center?
> >
>

--~--~-~--~~~---~--~~
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: ListView :: How to automatically scrool to see a element ?

2009-02-19 Thread for android
listView.setSelection(position);

On Thu, Feb 19, 2009 at 5:55 PM, CG  wrote:

>
> Dear all,
>
> I am facing a strange an issue that should simple to solve I suppose.
> I wonder how can I automatically scroll to see an element in a list
> view. Let's say I know that I want to see the element view number 6 in
> my list view, how do I scroll my list to see this element ?
>
> I look at the API but without any success, just a word on where to
> look will be really appreciated.
>
> Thanks for your help.
>
> C.
> >
>

--~--~-~--~~~---~--~~
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] Question on Html text

2009-02-18 Thread for android
Is there a way in which i can convert a link in an html representation into
a link in my client app.That is say i have string :

public static String sample3 ="Link text";

If i convert this into Spanned text by:

 Html.fromHtml(sample3);

then i have the text "Link Text",now if i need to change this into a
link,then how do i get the link which the string initially had?Thats is in
the screen the "Link Text" should appear as a link to "www.google.com"

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: How can I reuse layout.xml?

2009-02-17 Thread for android


On Wed, Feb 18, 2009 at 12:14 PM, ying lcs  wrote:

>
> Hi,
>
> In my activity, I have the following in my layout.xml file.
> Can you please tell me how can I make it 'resuable'?  For example, I
> what to create a library so that I can insert a component and it
> creates 4 buttons for me using linear layout? How can I combine all
> that into a 'view' or a widget?
>
>
> How can I achieve that?
>
>android:orientation="horizontal"
>android:layout_width="fill_parent"
>android:layout_height="wrap_content">
>android:text="+"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"/>
>
>android:text="-"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"/>
>
>android:text="*"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"/>
>
>android:text="/"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"/>
> 
>
> Thank you for any idea?
>
> >
>

--~--~-~--~~~---~--~~
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 in setting empty views in a list

2009-02-17 Thread for android
any help?

On Tue, Feb 17, 2009 at 1:59 PM, for android  wrote:

> I tried to set an empty view by the following code :
>
> LayoutInflater layoutInflater = this.getLayoutInflater();
> View emptyView = (View) layoutInflater.inflate(R.layout.empty_view,
> null);
> getListView().setEmptyView(emptyView);
>
> But when the list is empty the empty view is not getting displayed
>
> Attached the sample code,an extension of api demos of list_7.
>
>
> 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] Pick multiple contacts from the contacts application

2009-02-17 Thread for android
Is there any Intent for picking multiple contacts from the
Intent.ACTION_PICK?If yes whats the data that needs to be passed to the
intent?

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: Question on WebView

2009-02-16 Thread for android
I am confused now since there is no documentation of the difference between
WebChromeClient and WebViewClient .

Also in the WebChromeClient there is no equilvalent to onPageFinished.

On Mon, Feb 16, 2009 at 5:26 PM, Fred Grott(shareme)
wrote:

>
> WebChromeCliennt not WebClient than its accessible to javascript :)
>
> On Feb 16, 3:11 am, for android  wrote:
> > Found the solution .
> >
> > Extended the WebClient and set the webview to the client.
> >
> > and implemented the WebClient's onPageFinished.
> >
> > On Mon, Feb 16, 2009 at 12:53 PM, for android 
> wrote:
> > > I am using a WebView in a LinearLayout.Whats the best way to know
> whether
> > > the web page has been fully loaded or not?
> >
> > > i am aware of the method getProgress,but what i am looking for is a
> > > listener which lets me know when the web view is fully loaded.
> >
> > > 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: How to stop an Activity

2009-02-16 Thread for android
calling finish will close an activity.

A service should not ideally start an activity,it should throw up a
notification.

On Mon, Feb 16, 2009 at 4:19 PM, Android wrote:

>
> Hi,
>
> I have one Activity, that starts one Service and my service will lunch
> one Activity, i wanna to stop the Activity which one started my my
> Service after few seconds.
> Is there any way to achieve. Has anyone experienced this type of
> scenario.
>
> -Sunil
> >
>

--~--~-~--~~~---~--~~
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: Question on WebView

2009-02-16 Thread for android
Found the solution .

Extended the WebClient and set the webview to the client.

and implemented the WebClient's onPageFinished.

On Mon, Feb 16, 2009 at 12:53 PM, for android  wrote:

> I am using a WebView in a LinearLayout.Whats the best way to know whether
> the web page has been fully loaded or not?
>
> i am aware of the method getProgress,but what i am looking for is a
> listener which lets me know when the web view is fully loaded.
>
> 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] Question on WebView

2009-02-15 Thread for android
I am using a WebView in a LinearLayout.Whats the best way to know whether
the web page has been fully loaded or not?

i am aware of the method getProgress,but what i am looking for is a listener
which lets me know when the web view is fully loaded.

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 in sending messages with special characters

2009-02-14 Thread for android
any help?

On Fri, Feb 13, 2009 at 4:00 PM, for android  wrote:

> I donot have a device.I am testing on the emulator.
>
> When i send a message(problematically and through the device) with special
> characters i am not able to view them  properly.
>
> For eg: when i send a message from one emulator to another say "~Ha".I see
> only the character "~" in the other emulator.
>
> But when i send the same message from the DDMS ,i donot see the problem.
>
> Is this a problem with the emulator or am i missing somthing..
>
>
> sm.sendTextMessage("5556", null, "~Ha", null, null);
>

--~--~-~--~~~---~--~~
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] Problem in sending messages with special characters

2009-02-13 Thread for android
I donot have a device.I am testing on the emulator.

When i send a message(problematically and through the device) with special
characters i am not able to view them  properly.

For eg: when i send a message from one emulator to another say "~Ha".I see
only the character "~" in the other emulator.

But when i send the same message from the DDMS ,i donot see the problem.

Is this a problem with the emulator or am i missing somthing..


sm.sendTextMessage("5556", null, "~Ha", null, null);

--~--~-~--~~~---~--~~
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] Android Conference in Bangalore

2009-02-12 Thread for android
http://www.aboventures.com/android/index.html

--~--~-~--~~~---~--~~
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 in going in back/previous activity

2009-02-12 Thread for android
stacktrace??

On Fri, Feb 13, 2009 at 10:20 AM, Komal  wrote:

>
> No one can solve my problemsomebody please help me
>
> On Feb 10, 3:05 pm, Komal  wrote:
> > Hi,
> > I am developing simple application.
> > I have oneactivitywhich displays list of name of employees. I m
> > fetching the employees name from database.
> > when i click on any of the name ,i will display the next page showing
> > details of that employee. also fetching details of employee from the
> > database.
> > It is working perfectly.
> > but when i press back button of android phone to go back to the
> > list ,i m facing anerror.
> > how can i go back to the list?
> > please help me!!
> >
>

--~--~-~--~~~---~--~~
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: Question about layout and main.xml

2009-02-10 Thread for android
http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/


http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/RadioGroup1.html




On Wed, Feb 11, 2009 at 10:57 AM, automerc  wrote:

>
> while I was reading tutorials about android programming I saw that all
> UI objects such as radio buttons and layouts were declared in the
> main.xml file and just refer to using their ids in the java source
> code. I was wondering if this always has to been the case? I am trying
> to write a application that uses radio button heavily, but the amount
> of radio buttons needed is determined by the user. (Like the amount of
> possible answers to a question).
>
> So I was wondering if its possible to actually create radio buttons
> and add them to user interface from the java source code instead? If
> so, are there any tutorials showing how to do 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
-~--~~~~--~~--~--~---



[android-developers] Re: Parse an XML

2009-02-10 Thread for android
Context is the super -class of the Activity..so basically u need to use the
activity...

On Wed, Feb 11, 2009 at 10:56 AM, cool.manish wrote:

>
> What is the context?
> I am getting error at that point.
>
> Actually I am trying to parse the xml file
>
> SAXParser sp = spf.newSAXParser();
> sp.parse(context.getResources().getXml(R.xml.employees), this)
>
> On Feb 11, 3:32 am, Ludwig  wrote:
> > sorry that should have been
> > context.getResources().getXml(R.xml.myxml)
> >
> > Ludwig
> >
> > 2009/2/10 Ludwig 
> >
> >
> >
> > > put it under res/xml/myfile.xml (in Eclipse you will have to create
> that
> > > directory). You can then load the file as
> context.getResources(R.xml.myfile)
> > > HTH
> > > Ludwig
> >
> > > 2009/2/10 cool.manish 
> >
> > >> Hi, I am trying to make a simple application to parse the XML using
> > >> SAXParser but it is not finding the xml file which I have added in the
> > >> project. How and where should I add the XML file?- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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: what is command to check SDCARD is present ?

2009-02-09 Thread for android
android.os.Environment

On Mon, Feb 9, 2009 at 1:17 PM, jj  wrote:

>
> somebody will tel me the command for checking sdcard of device
>
> what is command to check SDCARD is present ?
>
> or in other words how to appl the sdcard is there or not?
>
> thank you
> >
>

--~--~-~--~~~---~--~~
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] Question on Multicomplete Text View

2009-02-06 Thread for android
I need to use a CursorAdapter to display the contacts in an auto complete
view.When the user has selected/typed the contacts he wants , how do i
retrieve the ids of the contacts he has typed in or selected.

I tried to use the onItemClicked,but if the user has typed the contact name
himself,I have no way of knowing the id of the typed contact.

Thanks for your time.

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

2009-02-04 Thread for android
In your adapter class u will be having the constructor something like this:
public class MyAdapter extends BaseAdapter{
   private List myList;
public MyAdapter(Context context, int rowResID,
List myList)
   this.myList= myList;
 }
 Other methods
 public void changeListContent(List myList){
this.myList= myList;
notifyDataSetChanged();
}


Now whenever u need to show a different set of data,u need to call the
changeListContent






On Wed, Feb 4, 2009 at 12:57 PM, cindy  wrote:

>
>
> I implemented the async incoming data on a separate thread which adds
> the items to a ArrayList that is connected to the view through my
> custom
> adapter (inherits BaseAdapter). But when I modified the ArrayList, the
> application crashes.
>
> Have you have the same problem?
> On Feb 3, 5:03 pm, Emmanuel  wrote:
> > Do you mean the data from your adapter has changed, and you want to
> > update your list from this ?
> >
> > To achieve this result, I create the adapter from the new data, and
> > reset it to the list.
> > There should be another cleaner method, but this is works for me !
> >
> > Emmanuelhttp://androidblogger.blogspot.com/
> >
> > On Feb 3, 7:36 pm,cindy wrote:
> >
> > > I have a list. Which will first show 10 items, user would be able to
> > > do pagination with click pagination button.
> >
> > > The list is extended from listActivity, and the list adapter is
> > > extends from BaseAdapter .
> >
> > > But how to update UI when I get next 10 items back?
> >
> > > Thanks!
> >
> > > April
> >
>

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

2009-02-03 Thread for android
notifyDataSetChanged().

On Wed, Feb 4, 2009 at 6:33 AM, Emmanuel  wrote:

>
> Do you mean the data from your adapter has changed, and you want to
> update your list from this ?
>
> To achieve this result, I create the adapter from the new data, and
> reset it to the list.
> There should be another cleaner method, but this is works for me !
>
> Emmanuel
> http://androidblogger.blogspot.com/
>
> On Feb 3, 7:36 pm, cindy  wrote:
> > I have a list. Which will first show 10 items, user would be able to
> > do pagination with click pagination button.
> >
> > The list is extended from listActivity, and the list adapter is
> > extends from BaseAdapter .
> >
> > But how to update UI when I get next 10 items back?
> >
> > Thanks!
> >
> > April
> >
>

--~--~-~--~~~---~--~~
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: Template for Activity

2009-02-03 Thread for android


On Tue, Feb 3, 2009 at 9:58 PM, mat  wrote:

>
> Hi All,
> Is it possible to add the same element e.g ImageView, TextView to all
> activity layouts ? Can I do it by specifying some kind of template,
> theme maybe in order to omit adding the same component to every
> layout.
>
> 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: Extending a tablelayout

2009-01-25 Thread for android
public class BorderedTableLayout extends TableLayout {
 private Rect mRect;
 private Paint mPaint;
 public BorderedTableLayout(Context context, AttributeSet attrs) {
  super(context, attrs);
  mRect = new Rect();
  mPaint = new Paint();
  mPaint.setStyle(Paint.Style.STROKE);
  mPaint.setColor(Color.BLACK);
 }
 @Override
 protected void onDraw(Canvas canvas) {
  Rect r = mRect;
  Paint paint = mPaint;
  getDrawingRect(r);
r.right--;
r.bottom--;
  canvas.drawRect(r, paint);
  super.onDraw(canvas);
 }
}


On Mon, Jan 26, 2009 at 2:08 AM, MaTriXy  wrote:

>
> can you post the full solution??
> i need to show up a table with borders and bumped into your thread.
>
>
> On Dec 19 2008, 11:41 am, "for android"  wrote:
> > Thank you very much it works :)
> >
> > On Fri, Dec 19, 2008 at 2:42 PM, Romain Guy 
> wrote:
> >
> > > This is a classic off by 1 error with the drawRect method. There was
> > > an interesting presentation at JavaOne on this topic. Anyway, all you
> > > need to do is the following:
> >
> > > getDrawingRect(r);
> > > r.right--;
> > > r.bottom--;
> >
> > > And you're done.
> >
> > > On Fri, Dec 19, 2008 at 10:08 AM, for android 
> > > wrote:
> > > > Attached is a sample code of what i am trying to do.so that the prb
> is
> > > more
> > > > clear.I hope I get some help...
> >
> > > > On Fri, Dec 19, 2008 at 11:47 AM, for android 
> > > wrote:
> >
> > > >> any help
> >
> > > >> On Thu, Dec 18, 2008 at 6:42 PM, for android 
>  > > wrote:
> >
> > > >>> i need to get a customizable tablelayout with borders. Hence in the
> > > >>> onDraw,I have the following code,but i get only the left side and
> top
> > > of the
> > > >>> rectangle.but not on the right and bottom lines of the rectangle.
> >
> > > >>> I have layout in which the layout has a white background.And that
> > > layout
> > > >>> has a table with blue background.I am trying to have bordered table
> > > layout
> > > >>> for that:The layout is something like this:
> >
> > > >>> 
> > > >>> 
> > > >>> 
> >
> > > >>> public BorderedTableLayout(Context context, AttributeSet attrs) {
> > > >>> super(context, attrs);
> > > >>> mRect = new Rect();
> > > >>> mPaint = new Paint();
> >
> > > >>> mPaint.setStyle(Paint.Style.STROKE);
> > > >>> mPaint.setColor(Color.BLACK);
> > > >>> }
> >
> > > >>> @Override
> > > >>> protected void onDraw(Canvas canvas) {
> > > >>> Rect r = mRect;
> > > >>> Paint paint = mPaint;
> > > >>>getDrawingRect(r);
> >
> > > >>> canvas.drawRect(r, paint);
> > > >>> super.onDraw(canvas);
> > > >>> }
> >
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>  >
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  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] Re: How can i close my project?

2009-01-22 Thread for android
start the activities with startActivityForResult(intent,MY_CODE) and on each
Activity override onActivityResult close that activity

protected void onActivityResult(int requestCode, int resultCode, Intent
data) {
switch (resultCode) {

case Constants.MY_CODE:
this.setResult(Constants.MY_CODE);
this.finish();
break;
}

/* Finally call the super()-method. */
super.onActivityResult(requestCode, resultCode, data);
}

On Thu, Jan 22, 2009 at 2:20 PM,  wrote:

>
> Hi developers
>
>I have a problem. I have a project which has 5
> activities. All the activities are connected through intent. I have a
> exit button to exit the whole project . I have used finish() function
> but it just close the current activity. It works like back. Please
> give me the appropiate funtion replace of finish() by which i can exit
> my project.
>
>
>
>
> Suman.
> >
>

--~--~-~--~~~---~--~~
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: Replace the current view by an other view

2009-01-21 Thread for android
Oh ok..I think I understand it now..

On Thu, Jan 22, 2009 at 9:23 AM, Romain Guy  wrote:

>
> The point of runOnUiThread() *is* to run code on the UI thread.
> Therefore it must NOT be used for long running operations. Usually
> runOnUiThread() is invoked from another thread.
>
> On Wed, Jan 21, 2009 at 7:50 PM, for android  wrote:
> > any help on this ??
> >
> > On Wed, Jan 21, 2009 at 8:13 PM, for android 
> wrote:
> >>
> >> i have one question around the runOnUiThread...Basically when i used
> this
> >> method in the onCreate/onStart of the Activity,i found that it works
> quite
> >> differently than i expect..
> >>
> >> For example in the onCreate/onStart..say I have long running operation
> >> before which i want to render the UI with a progress bar.and after the
> long
> >> runnin operation is complete remove the progress bar and show the
> view..In
> >> this case I found that the UI is rendered only after the long running
> >> operation...so i end up not seeing the progress bar..I ended up using
> the
> >> handler...Am i going wrong in my understanding of this method?
> >>
> >>
> >>
> >> protected void onStart(){
> >> super.onStart();
> >> Progress Bar Visible
> >> runOnUiThread( new Thread() {
> >> // go get our feed!
> >> public void run() {
> >> //longrunning operation
> >>  //Progress Bar Gone
> >>  //show the required view
> >>
> >> }
> >> });
> >> }
> >>
> >> On Wed, Jan 21, 2009 at 7:55 PM, Mark Murphy 
> >> wrote:
> >>>
> >>> Nico wrote:
> >>> > Hi,
> >>> > I need to replace the current View (set by the
> activity.setContentView
> >>> > method) by an other.
> >>> > When I call activity.setContentView two times, I get this exception :
> >>> > 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot
> >>> > $CalledFromWrongThreadException: Only the original thread that
> created
> >>> > a view hierarchy can touch its views.
> >>> > 01-21 14:13:54.757: WARN/System.err(1156): at
> >>> > android.view.ViewRoot.checkThread(ViewRoot.java:1849)
> >>> > 01-21 14:13:54.757: WARN/System.err(1156): at
> >>> > android.view.ViewRoot.requestLayout(ViewRoot.java:455)
> >>> > 01-21 14:13:54.767: WARN/System.err(1156): at
> >>> > android.view.View.requestLayout(View.java:6575)
> >>> > 01-21 14:13:54.767: WARN/System.err(1156): at
> >>> > android.view.View.requestLayout(View.java:6575)
> >>> > 01-21 14:13:54.777: WARN/System.err(1156): at
> >>> > android.view.View.requestLayout(View.java:6575)
> >>> > 01-21 14:13:54.777: WARN/System.err(1156): at
> >>> > android.view.ViewGroup.removeAllViews(ViewGroup.java:2033)
> >>> > What is problem ?
> >>>
> >>> As the exception says: "Only the original thread that created
> >>> a view hierarchy can touch its views".
> >>>
> >>> Are you attempting to call setContentView() from a background thread?
> If
> >>> so, arrange to call it on the UI thread, via post(), runOnUiThread(),
> or
> >>> a Handler.
> >>>
> >>> --
> >>> Mark Murphy (a Commons Guy)
> >>> http://commonsware.com
> >>> Android Training in Sweden -- http://www.sotrium.com/training.php
> >>>
> >>>
> >>
> >
> >
> > >
> >
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  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] Re: Replace the current view by an other view

2009-01-21 Thread for android
any help on this ??

On Wed, Jan 21, 2009 at 8:13 PM, for android  wrote:

> i have one question around the runOnUiThread...Basically when i used this
> method in the onCreate/onStart of the Activity,i found that it works quite
> differently than i expect..
>
> For example in the onCreate/onStart..say I have long running operation
> before which i want to render the UI with a progress bar.and after the long
> runnin operation is complete remove the progress bar and show the view..In
> this case I found that the UI is rendered only after the long running
> operation...so i end up not seeing the progress bar..I ended up using the
> handler...Am i going wrong in my understanding of this method?
>
>
>
> protected void onStart(){
> super.onStart();
> Progress Bar Visible
> runOnUiThread( new Thread() {
> // go get our feed!
> public void run() {
> //longrunning operation
>  //Progress Bar Gone
>  //show the required view
>
> }
> });
>
> }
>
> On Wed, Jan 21, 2009 at 7:55 PM, Mark Murphy wrote:
>
>>
>> Nico wrote:
>> > Hi,
>> > I need to replace the current View (set by the activity.setContentView
>> > method) by an other.
>> > When I call activity.setContentView two times, I get this exception :
>> > 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot
>> > $CalledFromWrongThreadException: Only the original thread that created
>> > a view hierarchy can touch its views.
>> > 01-21 14:13:54.757: WARN/System.err(1156): at
>> > android.view.ViewRoot.checkThread(ViewRoot.java:1849)
>> > 01-21 14:13:54.757: WARN/System.err(1156): at
>> > android.view.ViewRoot.requestLayout(ViewRoot.java:455)
>> > 01-21 14:13:54.767: WARN/System.err(1156): at
>> > android.view.View.requestLayout(View.java:6575)
>> > 01-21 14:13:54.767: WARN/System.err(1156): at
>> > android.view.View.requestLayout(View.java:6575)
>> > 01-21 14:13:54.777: WARN/System.err(1156): at
>> > android.view.View.requestLayout(View.java:6575)
>> > 01-21 14:13:54.777: WARN/System.err(1156): at
>> > android.view.ViewGroup.removeAllViews(ViewGroup.java:2033)
>> > What is problem ?
>>
>> As the exception says: "Only the original thread that created
>> a view hierarchy can touch its views".
>>
>> Are you attempting to call setContentView() from a background thread? If
>> so, arrange to call it on the UI thread, via post(), runOnUiThread(), or
>> a Handler.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com
>> Android Training in Sweden -- http://www.sotrium.com/training.php
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Replace the current view by an other view

2009-01-21 Thread for android
i have one question around the runOnUiThread...Basically when i used this
method in the onCreate/onStart of the Activity,i found that it works quite
differently than i expect..

For example in the onCreate/onStart..say I have long running operation
before which i want to render the UI with a progress bar.and after the long
runnin operation is complete remove the progress bar and show the view..In
this case I found that the UI is rendered only after the long running
operation...so i end up not seeing the progress bar..I ended up using the
handler...Am i going wrong in my understanding of this method?



protected void onStart(){
super.onStart();
Progress Bar Visible
runOnUiThread( new Thread() {
// go get our feed!
public void run() {
//longrunning operation
 //Progress Bar Gone
 //show the required view

}
});
}

On Wed, Jan 21, 2009 at 7:55 PM, Mark Murphy wrote:

>
> Nico wrote:
> > Hi,
> > I need to replace the current View (set by the activity.setContentView
> > method) by an other.
> > When I call activity.setContentView two times, I get this exception :
> > 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot
> > $CalledFromWrongThreadException: Only the original thread that created
> > a view hierarchy can touch its views.
> > 01-21 14:13:54.757: WARN/System.err(1156): at
> > android.view.ViewRoot.checkThread(ViewRoot.java:1849)
> > 01-21 14:13:54.757: WARN/System.err(1156): at
> > android.view.ViewRoot.requestLayout(ViewRoot.java:455)
> > 01-21 14:13:54.767: WARN/System.err(1156): at
> > android.view.View.requestLayout(View.java:6575)
> > 01-21 14:13:54.767: WARN/System.err(1156): at
> > android.view.View.requestLayout(View.java:6575)
> > 01-21 14:13:54.777: WARN/System.err(1156): at
> > android.view.View.requestLayout(View.java:6575)
> > 01-21 14:13:54.777: WARN/System.err(1156): at
> > android.view.ViewGroup.removeAllViews(ViewGroup.java:2033)
> > What is problem ?
>
> As the exception says: "Only the original thread that created
> a view hierarchy can touch its views".
>
> Are you attempting to call setContentView() from a background thread? If
> so, arrange to call it on the UI thread, via post(), runOnUiThread(), or
> a Handler.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android Training in Sweden -- http://www.sotrium.com/training.php
>
> >
>

--~--~-~--~~~---~--~~
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: Replace the current view by an other view

2009-01-21 Thread for android
you are probably calling from a seperate thread..after thread has done its
wrk...use the handler and change the view..

On Wed, Jan 21, 2009 at 7:49 PM, Nico  wrote:

>
> Hi,
> I need to replace the current View (set by the activity.setContentView
> method) by an other.
> When I call activity.setContentView two times, I get this exception :
> 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot
> $CalledFromWrongThreadException: Only the original thread that created
> a view hierarchy can touch its views.
> 01-21 14:13:54.757: WARN/System.err(1156): at
> android.view.ViewRoot.checkThread(ViewRoot.java:1849)
> 01-21 14:13:54.757: WARN/System.err(1156): at
> android.view.ViewRoot.requestLayout(ViewRoot.java:455)
> 01-21 14:13:54.767: WARN/System.err(1156): at
> android.view.View.requestLayout(View.java:6575)
> 01-21 14:13:54.767: WARN/System.err(1156): at
> android.view.View.requestLayout(View.java:6575)
> 01-21 14:13:54.777: WARN/System.err(1156): at
> android.view.View.requestLayout(View.java:6575)
> 01-21 14:13:54.777: WARN/System.err(1156): at
> android.view.ViewGroup.removeAllViews(ViewGroup.java:2033)
> What is problem ?
> Thx
> >
>

--~--~-~--~~~---~--~~
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: Regarding Activity

2009-01-19 Thread for android
Look at the code for Music app..your requirement is exactly similar to
that..

On Mon, Jan 19, 2009 at 3:40 PM, mongd  wrote:

>
> Hi, I'm working on a program which basically plays a video file and
> has some more functionality.
> What I expect from this program is:
> when I start playing a video, the program starts a new service and
> registers a notification.
> I click the home button and still the video is running so I can hear
> the sound, but the program doesn't have focus any more( no more video
> animation). Now I drag down the notification list and click the
> notification message, then the currently running program will pop up
> and now I can see the video again.
>
> What I want to ask is how to come back to the program when I click the
> notification message? I've been looking into the website and this
> group, but I couldn't find any clue. Please help!
>
> Oh, and one more question:
> is it possible to put more than 2 activities on the same screen? if it
> is, is there any reference for that?
>
> Million thanks in advance! =D
>
> >
>

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



  1   2   >