[android-developers] Re: Keeping Google's Android Honest

2008-03-31 Thread Zach Hobbs

I second that!  GPL v2 or v3 will help keep the community thriving.

-- 

Zach Hobbs
HelloAndroid.com
Android OS news, tutorials, downloads 



On Monday 31 March 2008 23:55:22 Steve918 wrote:
> I recently published a post discussing reasons why GPL V3 is the
> obvious choice for Android Developers.  Comments would be greatly
> appreciated.
>
> http://steven.bitsetters.com/articles/2008/03/31/keeping-googles-android-ho
>nest/ 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: stand-alone notepad content provider insert error

2008-03-31 Thread haitian


Maybe you database is collision or error. you can try to wipe all the
emulator data.

In DOS command, change the current path to \Your_Android_SDK_Path\tools
\

run "emulator -wipe-data" to wipe all the emulator data.

On 3月26日, 下午6时00分, logisic <[EMAIL PROTECTED]> wrote:
> played around with the original notepad example. split the code into 2
> apps as follows: app NotePad(com.google.android.notepad) contains
> NoteEditor.java, NotesList.java and TitleEditor.java. app
> NoteProvider(com.google.provider) contains NotePad.java and
> NotePadProvider.java.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing activity label

2008-03-31 Thread Rader

Resources are read only, try to set the title as Zach Hobbs has
written.

On Apr 1, 10:10 am, DotNetCode <[EMAIL PROTECTED]> wrote:
> I want to dynamically change the label of the activity in my code.
> Can some one please help me achieve this?
>
> 
>
> How can I set the label of this activity in my code?
>
> 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Asynchronously loading problem

2008-03-31 Thread Rader

What i want to do is starting a new thread when i click a button and
this new thread will do some long-time tasks. A loading dialog will be
shown before that thread starts and will be hidden when the thread
ends.If i wait until the thread finishes its job and ends normally,
everything will be OK. But if i cancel the loading dialog and
"interrupt" the thread in the cancel event handler of that dialog, an
UnCaughtExcetpion will be thrown.

Quote:
Can't create handler inside the thread that has not called
Looper.prepare()


Full code: AsyncLoadingMgrSample .java

Java:

package ciente.cl;

import java.util.concurrent.Callable;
import java.util.concurrent.CompletionService;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.FutureTask;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

/**
 * @author rader
 *
 */
public class AsyncLoadingMgrSample extends Activity {

 private final AsyncLoadingMgr mgr=new AsyncLoadingMgr(this);
 protected Runnable cancelLoding;
 protected FutureTask loading;;
 ProgressDialog mProgDlg;

 final public FinishlLoadingTask finishLoadingTask=new
FinishlLoadingTask();

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle icicle) {
  super.onCreate(icicle);
  setContentView(R.layout.asyncloadingmgrsample);

//loading=new FutureTask(new LoadingTask(this));
//cancelLoding=new CancelLoadingTask();

  final Handler handler=new Handler();


  Button btnAsyncLoad=(Button)findViewById(R.id.btnAsyncLoad);
  btnAsyncLoad.setOnClickListener(new OnClickListener(){

   @Override
   public void onClick(View arg0){
EditText
txt=(EditText)findViewById(R.id.txtAsyncLoad);

 //Executor
executor=java.util.concurrent.Executors.newFixedThreadPool(1);
 //CompletionService completionService =
 //   new
ExecutorCompletionService(executor);
txt.setText("start task...");
try {
//   Callable task=new LoadingTask(handler);
 final Thread loadingThread=new Thread(new
LoadingTask2(handler));
 loadingThread.start();

 mProgDlg =
ProgressDialog.show(AsyncLoadingMgrSample.this, null,
   "Please wait while loading...",
true, true);
 mProgDlg.setCancelListener(new
OnCancelListener(){

  @Override
  public void onCancel(DialogInterface
arg0) {
   loadingThread.interrupt();

// while(!
loadingThread.isInterrupted()){
//
// }
 
Toast.makeText(AsyncLoadingMgrSample.this,"loading task
interruptted",Toast.LENGTH_LONG).show();
 
Log.i("CancelLoadingTask:Run","loading task interruptted");
   EditText
txt=(EditText)findViewById(R.id.txtAsyncLoad);
   txt.setText("loading task
interruptted");

  }

 });
//   completionService.submit(task);
 txt.setText("wait for the task ending");
} catch (Exception e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 Log.e("CancelLoadingTask:Run","loading task
canceled["+e.toString());
}

   }

  });
 }

 class CancelLoadingTask implements Runnable{

  @Override
  public void run() {
   if(mProgDlg!=null)
mProgDlg.dismiss();
   EditText txt=(EditText)findViewById(R.id.txtAsyncLoad);
   txt.setText("loading task canceled");
   Toast.makeText(AsyncLoadingMgrSample.this,"loading task
canceled",Toast.LENGTH_LONG).show();
   Log.i("CancelLoadingTask:Run","loading task canceled");

  }

 }
 class FinishlLoadingTask implements Runnable{

  @Override
  public void run() {
   if(mProgDlg!=null)
mProgDlg.dismiss();
   EditText txt=(EditText)findViewById(R.id.txtAsyncLoad);
   txt.setText("loading task finshed");
   Toast.makeText(AsyncLoadingMgrSample.this,"loading task
finshed",Toast.LENGTH_LONG).show();
   Log.i("FinishlLo

[android-developers] Re: MediaPlayer Issue - youTube

2008-03-31 Thread Megha Joshi
Hi Vikram,

The MediaPlayer does not support playing videos off Youtube at this time.

Thanks,
Megha

On Mon, Mar 31, 2008 at 8:36 PM, Markiv <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> When I try to launch a youTube link from within the browser I get an
> error " Network Error: Unsupported Protocol"
>
> What I want to be able to do is launch a youTube link, preferably from
> within Android Media Player or browser. I wanted to know:
>
> 1. If this can be done?
>
> 2. If yes, I would really appreciate if some one could provide a
> sample code.
>
>
> Thanks,
> Vikram
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Maven Plugins For Android

2008-03-31 Thread Shane Isbell
I've done a release, you can find the tag here.
http://masa.googlecode.com/svn/tags/masa-project-1.0/
I've also set up the artifacts into repository, so you don't need to build.
Place the following in your pom or settings.xml file.



m2-repo.release
Maven Release Repository
http://m2-repo.googlecode.com/svn/release

false


true




Keep in mind that you will still need to install the android.jar into your
local repo  (unless you are using system scope): Check the README,txt file
in the tag to see how the android.jar install is done.
Shane

On Mon, Mar 31, 2008 at 1:02 PM, Shane Isbell <[EMAIL PROTECTED]>
wrote:

>
> I added support for aidl a few days ago. I've also add a maven par
> plugin that will package up provisioning archives (JSR-124) and you
> can submit these to a JVending server for stocking of android
> applications.
>
> I've moved the code from the Apache Maven sandbox to
>   http://code.google.com/p/masa
> You can checkout and build:
>   svn checkout http://masa.googlecode.com/svn/trunk/ masa
>
> I plan on getting an official release out soon. If you find any bugs
> or need additional features, just enter into the project tracker.
>
> Shane
>
> On Feb 26, 1:28 pm, androidian <[EMAIL PROTECTED]> wrote:
> > Hi Shane,
> >
> > Does the plugin do aidl? It doesn't seem to generate a java file from
> > an aidl file I have and it's breaking my build.
> >
> > Kai
> >
> > On Jan 11, 12:25 am, Shane Isbell <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I just did some updates to theMavenAndroidplugins. Thepluginsnow
> > > include the java dependencies of a project in the main classes.dx
> > > file. This means you can start pulling jar dependencies from the
> > > centralMavenrepo and have them automatically compiled and packaged
> > > forAndroid. Note that I've also changed the type toandroid:apk.
> >
> > > Shane
> >
> > > On Nov 15 2007, 2:32 am, baker <[EMAIL PROTECTED]> wrote:
> >
> > > > I'm feeling so at home withandroid, loving it. Thanks for themaven
> > > > check in, will come in handy.
> >
> > > > On Nov 14, 9:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]
> >
> > > > wrote:
> >
> > > > > I just checked inMavenplugins forandroid:
> >
> > > > >
> https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-an...
> >
> > > > > Read the README.txt file on how to build and use.- Hide quoted
> text -
> >
> > > > - Show quoted text -- 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What's this warning means?

2008-03-31 Thread Dan U.

I don't think you can do anything about it. I believe I've seen that
before and I ignore it. It's probably something internal. It's
surprising the number of warnings (and even a few errors) you see that
don't have anything to do with your app. For instance, I always get a
ClassNotFoundException for some class that I have no idea what it's
for.

On Mar 31, 10:53 pm, areslp <[EMAIL PROTECTED]> wrote:
> WARN/global(626): WARNING: Default buffer size used in BufferedReader
> constructor. It would be better to be explicit if a 8k-char buffer is
> required.
> It appears when map.getController().animateTo(des),after the map
> center moved to the des point,the warning continuous appeared in the
> log window,what can I do for 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: misbehaving grid (not aligning properly with multi-line text and image)

2008-03-31 Thread Megha Joshi
Hi Ken,

It seems that the grid does not behave well if WRAP_LAYOUT or FILL_PARENT
are used inside the cell's layout.

I changed the following code :

addView(icon, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
   this.icon.setImageBitmap(getBitmap(urlString));

   this.name = new TextView(context);
   addView(this.name, new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));

to:

addView(icon, new
LinearLayout.LayoutParams(50,50));
   this.icon.setImageBitmap(getBitmap(urlString));

   this.name = new TextView(context);
   addView(this.name, new
LinearLayout.LayoutParams(50,50));


and then your grid works fine. You may want to log a bug in the issue
tracker about the grid getting distorted by using the WRAP_LAYOUT and
FILL_LAYOUT.

Thanks,
Megha
On Sat, Mar 29, 2008 at 1:06 AM, Ken <[EMAIL PROTECTED]> wrote:

>
> Could someone help? Thanks!
>
> Ken
>
>
> On Mar 25, 10:22 pm, Ken <[EMAIL PROTECTED]> wrote:
> > Oops  I've attached the Icon class below. Initially the grid is
> > aligned at the top, but if you move around using the DPAD, the grid
> > seems to be aligned at the bottom. But since the total height of the
> > icon+text is different (we have both the one-line text like iconxxx
> > and two-line text like iconxx), the grid is messed up 
> >
> > Ken
> >
> > - Icon.java -
> > package com.test.threadtest;
> >
> > public class Icon {
> > public String name;
> > public String iconUrl;
> >
> > public Icon() {
> > name = "";
> > iconUrl = "";
> > }
> >
> > }
> >
> > On Mar 25, 4:56 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> >
> > > I tried to run your code to see what you mean by alignment is messed
> up, but
> > > the code for Icon class is missing.
> > > Can you give more details on what exactly is going wrong?
> >
> > > Thanks,
> > > Megha
> >
> > > On Sun, Mar 23, 2008 at 8:17 PM, Ken <[EMAIL PROTECTED]> wrote:
> >
> > > > Hi there,
> >
> > > > Please take a look at:
> > > >http://kombadil.willflow.com/misbehaving_grid/
> >
> > > > The grid starts out OK, but if you move around, the alignment is
> > > > messed up. Any suggestions?
> >
> > > > Thanks!
> >
> > > > Ken
> >
> > > > P.S. I've attached the code below:
> >
> > > > - main.xml -
> > > > 
> >
> > > > http://schemas.android.com/apk/res/android";
> > > >android:id="@+id/launch_grid"
> > > >android:layout_width="fill_parent"
> > > >android:layout_height="fill_parent"
> > > >android:padding="10dip"
> > > >android:verticalSpacing="10"
> > > >android:horizontalSpacing="10"
> > > >android:numColumns="auto_fit"
> > > >android:columnWidth="60"
> > > >android:stretchMode="columnWidth"
> >
> > > >android:gravity="center"
> > > > />
> >
> > > > - ThreadTest.java -
> > > > package com.test.threadtest;
> >
> > > > import java.io.BufferedInputStream;
> > > > import java.io.InputStream;
> > > > import java.net.HttpURLConnection;
> > > > import java.net.URL;
> > > > import java.util.ArrayList;
> > > > import java.util.List;
> >
> > > > import android.app.Activity;
> > > > import android.content.Context;
> > > > import android.content.Intent;
> > > > import android.graphics.Bitmap;
> > > > import android.graphics.BitmapFactory;
> > > > import android.os.Bundle;
> > > > import android.os.Handler;
> > > > import android.util.Log;
> > > > import android.view.View;
> > > > import android.view.ViewGroup;
> > > > import android.widget.AdapterView;
> > > > import android.widget.BaseAdapter;
> > > > import android.widget.GridView;
> > > > import android.widget.ImageView;
> > > > import android.widget.LinearLayout;
> > > > import android.widget.TextView;
> > > > import android.widget.AdapterView.OnItemClickListener;
> >
> > > > public class ThreadTest extends Activity {
> > > >private List icons;
> > > >private GridView launchView;
> > > >private IconListAdapter iconListAdapter;
> >
> > > >@Override
> > > >public void onCreate(Bundle icicle) {
> > > >super.onCreate(icicle);
> > > >setContentView(R.layout.main);
> > > >final Handler mHandler = new Handler();
> > > >icons = new ArrayList();
> >
> > > >Thread t = new Thread() {
> > > >public void run() {
> > > >perform();
> > > >mHandler.post(mUpdate);
> > > >}
> > > >};
> >
> > > >t.start();
> > > >}
> >
> > > >protected void perform() {
> > > >ServerHandler serverHandler = new ServerHandler();
> > > >icons = serverHandler.getIcons();
> > > >iconListAdapter = new IconListAdapter(this, icons);
> >
> > > >}
> >
> > > >final Runn

[android-developers] What's this warning means?

2008-03-31 Thread areslp

WARN/global(626): WARNING: Default buffer size used in BufferedReader
constructor. It would be better to be explicit if a 8k-char buffer is
required.
It appears when map.getController().animateTo(des),after the map
center moved to the des point,the warning continuous appeared in the
log window,what can I do for 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Google I/O Conference in San Francisco in May

2008-03-31 Thread Dan U.

I unfortunately couldn't justify the travel cost as I'm basically
unemployed right now. It really sucks because Google gave me a
complimentary pass to it :-( Oh well, maybe there will be a next time.

On Mar 31, 10:14 pm, j <[EMAIL PROTECTED]> wrote:
> Anyone going to Google I/O?  I am definitely going.  Should be fun.
>
> A chance to win a 
> ticket:http://mashable.com/2008/03/31/google-io-ticket-giveaway/
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Google I/O Conference in San Francisco in May

2008-03-31 Thread j

Anyone going to Google I/O?  I am definitely going.  Should be fun.

A chance to win a ticket: 
http://mashable.com/2008/03/31/google-io-ticket-giveaway/
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Changing default link color

2008-03-31 Thread raid5

Does anyone know how to change the default link color that is used for
Linkify.addLinks()? The default blue color is very difficult to read
on the standard black android background. I know I probably have to
modify/create some new xml files but I have been unable to find any
documentation on this.

Thanks,
Adam
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Horizontal Scroll bar for Table Layout

2008-03-31 Thread Akil

Hi,

 Anybody knows to to create horizontal scroll bar for table layout.
or is there any layout which support horizontal scrollbar.

 I have tried scrollview but it is showing only vertical scroll bar.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Keeping Google's Android Honest

2008-03-31 Thread Steve918

I recently published a post discussing reasons why GPL V3 is the
obvious choice for Android Developers.  Comments would be greatly
appreciated.

http://steven.bitsetters.com/articles/2008/03/31/keeping-googles-android-honest/
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MediaPlayer Issue - youTube

2008-03-31 Thread Markiv

Hi,

When I try to launch a youTube link from within the browser I get an
error " Network Error: Unsupported Protocol"

What I want to be able to do is launch a youTube link, preferably from
within Android Media Player or browser. I wanted to know:

1. If this can be done?

2. If yes, I would really appreciate if some one could provide a
sample code.


Thanks,
Vikram
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout_Weight wierdness with ListView and Buttons (within vertical orientation LinearLayout)

2008-03-31 Thread Ram

Thank you Megha, this worked

Ram

On Mar 31, 11:37 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> Hi Ram,
>
> You should not be using wrap_content on the ListView but rather
> layout_height="0dip".
>
> Thanks,
> Megha
>
>
>
> On Mon, Mar 31, 2008 at 10:39 AM, Ram <[EMAIL PROTECTED]> wrote:
>
> > *bump*
>
> > On Mar 30, 1:00 am, Ram <[EMAIL PROTECTED]> wrote:
> > > Hi, I'm trying to create a screen with a listview and two buttons on
> > > it.
>
> > > I tried the following combination in main.xml and it seemed to work
> > > right (with the listview taking up ~80% of the height and the two
> > > buttons ~10% each)
>
> > > http://schemas.android.com/apk/res/
> > > android"
> > >     android:orientation="vertical"
> > > android:layout_width="fill_parent"
> > > android:layout_height="fill_parent"
> > > ...
> > >      > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"
> > >         android:layout_weight="0.8" .
>
> > >      > >         android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"
> > >         android:layout_weight="0.1"  and similarly for button2
> > > 
> > > Then, I tried increasing the button weights to 0.3 each and I reduced
> > > the listview weight to 0.4.
>
> > > With these changes, my expectation was that the listview would take
> > > 40% of the screen height and that the buttons would take 30% each.
> > > However, after the changes, the listview took up even more space than
> > > before. So I could see more list elements on the first screen now
> > > (though the listview weight was now only 40% and it had been 80%
> > > earlier)
> > >      The two buttons shrunk in height and so the button text wasn't
> > > drawn
>
> > > Does anyone know why increasing the layout_weight of the two buttons
> > > (from 10% to 30% each) decreased the height of the buttons (and why
> > > decreasing the layout_weight of the listview increased its height)
>
> > > Thanks Ram- 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing activity label

2008-03-31 Thread Zach Hobbs

Try setTitle(String)

-- 

Zach Hobbs
HelloAndroid.com
Android OS news, tutorials, downloads 




On Monday 31 March 2008 22:10:18 DotNetCode wrote:
> I want to dynamically change the label of the activity in my code.
> Can some one please help me achieve this?
>
> 
>
> How can I set the label of this activity in my code?
>
> 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Loading data after first draw.

2008-03-31 Thread xingye

add an overlay on the map.in onDraw() of the overlay, record the
time(last time) and calculate the frequency of each call.
the activity extends Runnable, in run() compare the current time with
last time + frequency, if the current time is great enough :-P

On Apr 1, 4:32 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
>  Hi,
>
> There is no callback function in the APIs that gets invoked when a MapView
> is completely displayed on screen.
> You may want to log a feature request in the android issue tracker for this.
>
> Thanks,
> Megha
>
> On Mon, Mar 31, 2008 at 10:50 AM, Redhunt <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hi
>
> > Does any one have any thoughts on the proper way to do this:
>
> > I want to create a thread to load data from the web AFTER at least one
> > "frame" has been drawn on the screen. This is for a MapView, so maybe
> > there is a way to instantiate a call when the map has completely drawn
> > at least once?
> > The MapView is contained in a MapActivity, obviously, so I could also
> > add the call somewhere in the activity.
> > Note: What I am looking for is the right place to instantiate a thread
> > after the user at least sees a map on the screen. So if I add the call
> > to the thread in OnResume in the MapActivity, for example, that would
> > not work, because at that point there is nothing drawn on the screen.
> > Any thoughts?
>
> > Thanks in advance
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Custom drawing states possible?

2008-03-31 Thread Ted Hopp

Thanks! That's very cool.


On Mar 31, 6:22 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> You can use the mergeDrawableStates() method of the View class to provide
> your custom states:
>
> http://code.google.com/android/reference/android/view/View.html#merge...[],%20int[])
>
> Try the steps below to create new custom states:
>
> 1) Define the state resources in res/values/attrs.xml
>
>
> 
> 
> 
>
> 2) In your custom view class :
>
> A)   Declare the state variables:
>
>private static final int[] FRIED_STATE_SET = {
> R.attr.state_fried
>};
>
>private static final int[] BAKED_STATE_SET = {
> R.attr.state_baked
>};
>
> B) Override the onCreateDrawableState() method:
>
>@Override
> protected int[] onCreateDrawableState(int extraSpace) {
> final int[] drawableState = super.onCreateDrawableState(extraSpace +
> 2);
> if (isFried()) {
> mergeDrawableStates(drawableState, FRIED_STATE_SET);
> }
> if (isBaked()) {
> mergeDrawableStates(drawableState, BAKED_STATE_SET);
> }
> return drawableState;
> }
>
> Once this is done, you should be able to use these in
> ColorStateListDrawable, but you should use your app's namespace to use these
> new states:
>
> http://schemas.android.com/apk/res/android";
> xmlns:app="http://schemas.android.com/apk/res/">
>  state_fried="false" />
>  state_fried="true" />
>  state_fried="true" />
>  state_fried="false" />
> 
>
> On Mon, Mar 31, 2008 at 9:48 AM, Ted Hopp <[EMAIL PROTECTED]> wrote:
>
> > With some searching I've found several examples and explanations of
> > customizing the look of a component based on the drawing states. But I
> > haven't found anything about defining custom drawing states. For
> > instance, suppose I have a component that maintains states that I
> > might call "baked" and "fried" and I want it's appearance to track
> > these states. So I'm imagining this drawable:
>
> > http://schemas.android.com/apk/res/android";>
> >  > state_fried="false" />
> >  > state_fried="true" />
> >  > state_fried="true" />
> >  > state_fried="false" />
> > 
>
> > Is this possible? I see that it is possible (with setState,
> > mergeDrawableStates, etc.) to have custom state data, but I don't see
> > how to put this to use. I can't figure out from the documentation
> > whether it is even possible to define custom item state attributes in
> > xml, much less how to do it and link them to the state vector. (I'm
> > assuming that if this is possible, I could also mix custom attributes
> > with standard ones like android:state_pressed.) A pointer to an
> > example or two would be very helpful.
>
> > 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Show an image from a webserver

2008-03-31 Thread xingye

package org.yexing.android.sharepath;

import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.app.ListActivity;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewInflate;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

public class Main extends ListActivity {
private static final String LOG_TAG = "SharePath";

List> list;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
//  requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);

list = new ArrayList>();
int index = 1;

//  addItem(list, index++ + ". test", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.ChooseBuddy"));


//  addItem(list, index++ + ". Ask for Directions", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.Request"));
addItem(list, index++ + ". Ask or Record", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.SharePathMap"));
addItem(list, index++ + ". Inbox", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.Inbox"));
//  addItem(list, index++ + ". Outbox", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.Outbox"));
//  addItem(list, index++ + ". Sent Request", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.Sent"));
addItem(list, index++ + ". My Maps", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.MyMaps"));
addItem(list, index++ + ". My Buddies", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.Buddy"));

setListAdapter(new ImageSimpleAdapter(this, list,
R.layout.main_list, new String[] { "title" },
new int[] { android.R.id.text1 }));

// 模拟bootup的按钮
//  Button btnBoot = (Button) findViewById(R.id.boot);
//  btnBoot.setOnClickListener(new View.OnClickListener() {
//
//  public void onClick(View v) {
//  Intent intent = new 
Intent(Intent.BOOT_COMPLETED_ACTION);
//  broadcastIntent(intent);
//  }
//  });
}

@SuppressWarnings("unchecked")
@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {
Map map = (Map) l.obtainItem(position);

Intent intent = (Intent) map.get("intent");
startActivity(intent);
}

@SuppressWarnings("unchecked")
protected void addItem(List> data, String name,
Intent intent) {
Map temp = new HashMap();
temp.put("title", name);
temp.put("intent", intent);
data.add(temp);
}

protected Intent activityIntent(String pkg, String componentName) {
Intent result = new Intent();
result.setClassName(pkg, componentName);
return result;
}

class ImageSimpleAdapter extends SimpleAdapter {

public ImageSimpleAdapter(Context context, List data, int 
resource,
String[] from, int[] to) {
super(context, data, resource, from, to);
// TODO Auto-generated constructor stub
}

@Override
public int getCount() {
// TODO Auto-generated method stub
return list.size();
}

@Override
public View getView(int position, View convertView, ViewGroup
parent) {
// TODO Auto-generated method stub
if(convertView == null) {
ViewInflate inflate = (ViewInflate)
getSys

[android-developers] Re: Show an image from a webserver

2008-03-31 Thread xingye

load image from network:)

public class Main extends ListActivity {
private static final String LOG_TAG = "SharePath";

List> list;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
//  requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);

list = new ArrayList>();
int index = 1;

//  addItem(list, index++ + ". test", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.ChooseBuddy"));


//  addItem(list, index++ + ". Ask for Directions", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.Request"));
addItem(list, index++ + ". Ask or Record", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.SharePathMap"));
addItem(list, index++ + ". Inbox", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.Inbox"));
//  addItem(list, index++ + ". Outbox", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.Outbox"));
//  addItem(list, index++ + ". Sent Request", activityIntent(
//  "org.yexing.android.sharepath",
//  "org.yexing.android.sharepath.Sent"));
addItem(list, index++ + ". My Maps", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.MyMaps"));
addItem(list, index++ + ". My Buddies", activityIntent(
"org.yexing.android.sharepath",
"org.yexing.android.sharepath.Buddy"));

setListAdapter(new ImageSimpleAdapter(this, list,
R.layout.main_list, new String[] { "title" },
new int[] { android.R.id.text1 }));

// 模拟bootup的按钮
//  Button btnBoot = (Button) findViewById(R.id.boot);
//  btnBoot.setOnClickListener(new View.OnClickListener() {
//
//  public void onClick(View v) {
//  Intent intent = new 
Intent(Intent.BOOT_COMPLETED_ACTION);
//  broadcastIntent(intent);
//  }
//  });
}

@SuppressWarnings("unchecked")
@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {
Map map = (Map) l.obtainItem(position);

Intent intent = (Intent) map.get("intent");
startActivity(intent);
}

@SuppressWarnings("unchecked")
protected void addItem(List> data, String name,
Intent intent) {
Map temp = new HashMap();
temp.put("title", name);
temp.put("intent", intent);
data.add(temp);
}

protected Intent activityIntent(String pkg, String componentName) {
Intent result = new Intent();
result.setClassName(pkg, componentName);
return result;
}

class ImageSimpleAdapter extends SimpleAdapter {

public ImageSimpleAdapter(Context context, List data, int 
resource,
String[] from, int[] to) {
super(context, data, resource, from, to);
// TODO Auto-generated constructor stub
}

@Override
public int getCount() {
// TODO Auto-generated method stub
return list.size();
}

@Override
public View getView(int position, View convertView, ViewGroup
parent) {
// TODO Auto-generated method stub
if(convertView == null) {
ViewInflate inflate = (ViewInflate)
getSystemService(Context.INFLATE_SERVICE);
convertView = inflate.inflate(R.layout.main_list, null,
null);
TextView tv =
(TextView)convertView.findViewById(R.id.text1);
tv.setText((String)list.get(position).get("title"));
ImageView iv =
(ImageView)convertView.findViewById(R.id.image);
//  iv.setImageResource(R.drawable.badge);
Uri uri = Uri.parse("http://www.yexing.org/image.axd?
picture=browse.png");

//  iv.setImageURI(uri);
//  

[android-developers] Re: selectable AutoCompleteTextView and "filtering" issue

2008-03-31 Thread Romain Guy

You are probably clicking on the result list. In that case you are in
touch mode and the selection does not exist in the drop down. Instead
of calling parent.getSelected*() you should call obtainItem(int
position).

On Mon, Mar 31, 2008 at 5:30 PM, Max Binshtok <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I have a problem with AutoCompleteTextView
>
>  I have a (clickable) list of objects i.e. when you click on an item
>  you get to another activity which is guided by that specific item
>  clicked. I want to use the Autocomplete to search in that list but I
>  want the same behavior I get with a regular list - an item to be
>  clicked and processed. Please see my code:
>
>
>
> ArrayAdapter adapter = new ArrayAdapter(this,
> android.R.layout.simple_list_item_1, namesLIST);
> AutoCompleteTextView textView = (AutoCompleteTextView)
>  findViewById(R.id.list);
>
> textView.setAdapter(adapter);
>
>  Where namesLIST is a String array created specially for the
>  Autocomplete
>
>  Then I do:
> textView.setOnItemClickListener(new OnItemClickListener() {
> public void onItemClick(AdapterView parent, View v, 
> int position,
>  long id) {
> showItem(parent,position, id);
> }
> });
>
>  where I tried to see what I get:
>
> private void showItem(AdapterView parent, int position, long id) {
> Log.d(TAG,"zz position:" + parent.getSelectedItemPosition());
> Log.d(TAG,"selected item:" +parent.getSelectedItem());
> Log.d(TAG,"adapter view:" + parent);
> Log.d(TAG,"position:" + position + " id:" +id);
> }
>
>  I saw that I get nothing useful here. Typical output would be:
>  zz position: -1
>  selected item: null
>  adapter view: .
>  position: 1 id:1
>
>  What am I doing wrong? How can I keep the reference to original items
>  in the original list?
>  Maybe I can I use the original objects somehow in Autocomplete?
>
>
>  Thank you for your help!
>  >
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Changing activity label

2008-03-31 Thread DotNetCode

I want to dynamically change the label of the activity in my code.
Can some one please help me achieve this?



How can I set the label of this activity in my code?

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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to add ScrollView in TableLayout programaticly?

2008-03-31 Thread andric(www.oksbt.com)


in my code , i did it as follows:

//header should be steady
tableLayout.addView(headTableRow, new TableLayout.LayoutParams());

// add srollview
tableLayout.addView( scrollView, new TableLayout.LayoutParams());

//insert row to scrool view
scrollView.addView(firstTableRow, new TableLayout.LayoutParams());
scrollView.addView(secondTableRow, new TableLayout.LayoutParams());

//

//end

but it doesn't work fine.

any body has a good practice?
or any hint?

thanks in advance.

andric.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Life cycle of activities updating a database

2008-03-31 Thread hackbod

Yeah for prompting dialogs I believe our approach is to have ok and
cancel buttons, with back meaning cancel.  These are very different
than editing screens, where there is actually some concrete thing you
are operating on.

These details of the UI have still been in flux; it's not something I
am involved with a lot, so I can't really give you concrete answers
for these details of UI conventions.

On Mar 31, 5:05 pm, Peli <[EMAIL PROTECTED]> wrote:
> Ok, thank you for the hints.
>
> In my case, I display a subactivity in form of a dialog for entering
> connection settings. Pressing "back" returned to the main activity
> that reconnected with the new settings.
>
> So I guess the best is to introduce the "OK" and "Cancel" buttons, and
> have pressing "back" meaning "Cancel" in a dialog, right? (so the edit-
> in-place model really applies only to main activities, and not to
> dialogs as I mistakenly assumed...)
>
> Peli
>
> On Apr 1, 1:14 am, hackbod <[EMAIL PROTECTED]> wrote:
>
> > On Mar 31, 1:38 pm, Peli <[EMAIL PROTECTED]> wrote:
>
> > > If the design philosophy is "save on back", then why does this default
> > > to
> > > RESULT_CANCELED?
>
> > Activities only return results when the caller is asking for something
> > -- typically the user picking an item like a contact, a media file,
> > etc.  When you are saving your data you are storing it in a content
> > provider, not returning it as a result.
>
> > > My workaround is to call "finish()" in the "onPause()" method, right
> > > after "setResult(...)".
>
> > You almost certainly don't want to always call finish() in onPause(),
> > you can be paused for many reasons: the user pressing the home button,
> > the device going to sleep, etc.
>
> > The key thing is that while being paused, you need to have your state
> > saved away so it can be recovered if the process has to be killed and
> > your activity later restarted.  This is one of the motivations for
> > using an edit-in-place model, in addition to the fact that the user
> > can easily be distracted from your applications (by a phone call for
> > example) and not return any time soon to what they were doing.
> > Typically this can be handled by either writing the data so far, or
> > storing a "draft" record that the user can go back and complete (for
> > example if composing an e-mail).
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Developers Challenge!

2008-03-31 Thread Dan U.

> We wanted to bring your attention...

If you don't mind me asking, who are "we"? Are you a member of some
group?

Is there a reason we should be focusing on this particular type of
application?

I don't mean to be pessimistic, but I think suggesting people get
started on an app with only 2 weeks to go in the challenge is asking a
bit much. Maybe there are some teams out there that have been working
on this kind of thing for awhile. They have a much better chance at
winning.

On Mar 31, 5:29 pm, Swati <[EMAIL PROTECTED]> wrote:
> Hi all -
>
> We wanted to bring your attention to a particular component of the
> Android Developer Challenge. Part of the Challenge encourages useful
> apps in service of global economic development specifically. These
> include those apps that:
>
> * Support humanitarian benefits such as vastly improved monitoring
> and/or response efforts for diseases, climate change and/or natural
> disasters, or
> * Significantly benefit the ~3 billion people living on less than
> $2.00 per day.
>
> If you have a great idea for an app within one of these subject areas,
> we hope you'll enter the Challenge. The submission deadline is coming
> up fast, so please enter soon.
>
> How to get started:
> Download the SDK, build your applications, and submit your
> applications by April 14th, 2008.
>
> Here are some other resources to help you:
> * Android Developer Challenge FAQ.
> * Subscribe to the Android Developer Blog for the latest news on
> Android and any updates on the Android Developer Challenge.
> * Discuss the challenge with others via our Google Group.
> * Post to this Developers Forum thread with additional questions.
>
> Remember, the 50 most promising entries received for the Challenge by
> April 14 will each receive a $25,000 award to fund further
> development. Those selected will then be eligible for even greater
> recognition via ten $275,000 awards and ten $100,000 awards.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] selectable AutoCompleteTextView and "filtering" issue

2008-03-31 Thread Max Binshtok

Hi,

I have a problem with AutoCompleteTextView

I have a (clickable) list of objects i.e. when you click on an item
you get to another activity which is guided by that specific item
clicked. I want to use the Autocomplete to search in that list but I
want the same behavior I get with a regular list - an item to be
clicked and processed. Please see my code:



ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, namesLIST);
AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.list);

textView.setAdapter(adapter);

Where namesLIST is a String array created specially for the
Autocomplete

Then I do:
textView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int 
position,
long id) {
showItem(parent,position, id);
}
});

where I tried to see what I get:

private void showItem(AdapterView parent, int position, long id) {
Log.d(TAG,"zz position:" + parent.getSelectedItemPosition());
Log.d(TAG,"selected item:" +parent.getSelectedItem());
Log.d(TAG,"adapter view:" + parent);
Log.d(TAG,"position:" + position + " id:" +id);
}

I saw that I get nothing useful here. Typical output would be:
zz position: -1
selected item: null
adapter view: .
position: 1 id:1

What am I doing wrong? How can I keep the reference to original items
in the original list?
Maybe I can I use the original objects somehow in Autocomplete?


Thank you for your help!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Developers Challenge!

2008-03-31 Thread Swati

Hi all -

We wanted to bring your attention to a particular component of the
Android Developer Challenge. Part of the Challenge encourages useful
apps in service of global economic development specifically. These
include those apps that:

* Support humanitarian benefits such as vastly improved monitoring
and/or response efforts for diseases, climate change and/or natural
disasters, or
* Significantly benefit the ~3 billion people living on less than
$2.00 per day.


If you have a great idea for an app within one of these subject areas,
we hope you'll enter the Challenge. The submission deadline is coming
up fast, so please enter soon.

How to get started:
Download the SDK, build your applications, and submit your
applications by April 14th, 2008.

Here are some other resources to help you:
* Android Developer Challenge FAQ.
* Subscribe to the Android Developer Blog for the latest news on
Android and any updates on the Android Developer Challenge.
* Discuss the challenge with others via our Google Group.
* Post to this Developers Forum thread with additional questions.


Remember, the 50 most promising entries received for the Challenge by
April 14 will each receive a $25,000 award to fund further
development. Those selected will then be eligible for even greater
recognition via ten $275,000 awards and ten $100,000 awards.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Developers Challenge!

2008-03-31 Thread swati

Hi all -

We wanted to bring your attention to a particular component of the
Android Developer Challenge. Part of the Challenge encourages useful
apps in service of global economic development specifically. These
include those apps that:

* Support humanitarian benefits such as vastly improved monitoring
and/or response efforts for diseases, climate change and/or natural
disasters, or
* Significantly benefit the ~3 billion people living on less than
$2.00 per day.


If you have a great idea for an app within one of these subject areas,
we hope you'll enter the Challenge. The submission deadline is coming
up fast, so please enter soon.

How to get started:
Download the SDK, build your applications, and submit your
applications by April 14th, 2008.

Here are some other resources to help you:
* Android Developer Challenge FAQ.
* Subscribe to the Android Developer Blog for the latest news on
Android and any updates on the Android Developer Challenge.
* Discuss the challenge with others via our Google Group.
* Post to this Developers Forum thread with additional questions.


Remember, the 50 most promising entries received for the Challenge by
April 14 will each receive a $25,000 award to fund further
development. Those selected will then be eligible for even greater
recognition via ten $275,000 awards and ten $100,000 awards.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ContentObserver does not call onChange if data are changed through separate IntentReceiver?

2008-03-31 Thread Peli

It seems, my ContentObserver does not tell me if data are changed by a
different process? Or maybe I'm doing something wrong:

I have an activity in which I register a ContentObserver:


mCursorListFilter = getContentResolver().query(Lists.CONTENT_URI,
myFilter,
null, null, Lists.DEFAULT_SORT_ORDER);
startManagingCursor(mCursorListFilter);

class mListContentObserver extends ContentObserver {
public mListContentObserver(Handler handler) {
  super(handler);
}
@Override
public void onChange(boolean arg0) {
  Log.i(TAG, "mListContentObserver: onChange");
  mCursorListFilter.requery();
  super.onChange(arg0);
}

};

mCursorListFilter.registerContentObserver(new
mListContentObserver(new Handler()));



  I do receive the LogCat events onChange if data are changed from
within the same activity.

However, when I change the data through a separate IntentReceiver that
receives Intents in the background, I don't receive onChange events,
and my data in my ListViews don't get updated.

In the IntentReceiver I do something like this:


public void onReceiveIntent(Context context, Intent intent) {
  [...]
   Cursor c = mContentResolver.query(
Shopping.Lists.CONTENT_URI,
mProjectionLists,
Shopping.Lists.SHARE_NAME + " = '" + shareListName +
"'",
null,
Shopping.Lists.DEFAULT_SORT_ORDER);

   [...]
 c.first();
 c.updateString(mProjectionListsSHARECONTACTS, shareContacts);
 c.commitUpdates();
 c.requery();
}


The data are changed in the database. If I exit my activity and start
it again, I see the new data. Just they don't get updated "live" while
the IntentReceiver receives the data in the background.

Is a ContentObserver suitable for these cases, or is it only made to
notify within one activity? Should I use other methods so that the
IntentReceiver can notify the main Activity (if running)?

Peli


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Life cycle of activities updating a database

2008-03-31 Thread Peli

Ok, thank you for the hints.

In my case, I display a subactivity in form of a dialog for entering
connection settings. Pressing "back" returned to the main activity
that reconnected with the new settings.

So I guess the best is to introduce the "OK" and "Cancel" buttons, and
have pressing "back" meaning "Cancel" in a dialog, right? (so the edit-
in-place model really applies only to main activities, and not to
dialogs as I mistakenly assumed...)

Peli

On Apr 1, 1:14 am, hackbod <[EMAIL PROTECTED]> wrote:
> On Mar 31, 1:38 pm, Peli <[EMAIL PROTECTED]> wrote:
>
> > If the design philosophy is "save on back", then why does this default
> > to
> > RESULT_CANCELED?
>
> Activities only return results when the caller is asking for something
> -- typically the user picking an item like a contact, a media file,
> etc.  When you are saving your data you are storing it in a content
> provider, not returning it as a result.
>
> > My workaround is to call "finish()" in the "onPause()" method, right
> > after "setResult(...)".
>
> You almost certainly don't want to always call finish() in onPause(),
> you can be paused for many reasons: the user pressing the home button,
> the device going to sleep, etc.
>
> The key thing is that while being paused, you need to have your state
> saved away so it can be recovered if the process has to be killed and
> your activity later restarted.  This is one of the motivations for
> using an edit-in-place model, in addition to the fact that the user
> can easily be distracted from your applications (by a phone call for
> example) and not return any time soon to what they were doing.
> Typically this can be handled by either writing the data so far, or
> storing a "draft" record that the user can go back and complete (for
> example if composing an e-mail).
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Show an image from a webserver

2008-03-31 Thread dsrekab

I want to add images to a map that represent stored points on the map.
I can add an image if the image is stored in the r.drawable folder,
however, I would like the user to be able to load an image when they
store the point. For instance, if they stored a pointer to their work,
they may add an image of the company logo or something like that.

My initial thought was to store the uploaded image in the database in
base64 format. I then have a webpage the decodes the stored image and
displays it. However, I am not sure how to request the image from the
Android client, then show it on the map.

Does anyone have any ideas on how to get the image from the web
server, then display it on the map? Or possibly another way to
accomplish this task?

Thanks in Advance for any help anyone can offer.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AutoCompleteTextView Problem - Does not display content

2008-03-31 Thread [EMAIL PROTECTED]

Hi!

Here is the focus change handler I wrote for an AutoCompleteTextView.
Now my problem is that whenever, the view loses focus, it does not
display content in the box. However, when I switch back to
AutoCompleteTextView it starts displaying it. I think this is a wrong
behaviour. Any comments.

Regards
Nitin
HSC

uri_box.setOnFocusChangeListener(new OnFocusChangeListener(){
public void onFocusChanged(View v, boolean hasFocus)
{
if (hasFocus)
{
AutoCompleteTextView uri_box = 
(AutoCompleteTextView)v;
String st = 
uri_box.getText().toString().trim();
if (st.compareToIgnoreCase("Address") == 0)
{
uri_box.setText("");
}
}
else
{
AutoCompleteTextView uri_box = 
(AutoCompleteTextView)v;
if 
(uri_box.getText().toString().trim().length() == 0)
{
uri_box.setText("Address");
}
}
}}
);
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Custom drawing states possible?

2008-03-31 Thread Megha Joshi
Hi,

You can use the mergeDrawableStates() method of the View class to provide
your custom states:

http://code.google.com/android/reference/android/view/View.html#mergeDrawableStates(int[],%20int[])

Try the steps below to create new custom states:

1) Define the state resources in res/values/attrs.xml

   




2) In your custom view class :

A)   Declare the state variables:

   private static final int[] FRIED_STATE_SET = {
R.attr.state_fried
   };

   private static final int[] BAKED_STATE_SET = {
R.attr.state_baked
   };


B) Override the onCreateDrawableState() method:

   @Override
protected int[] onCreateDrawableState(int extraSpace) {
final int[] drawableState = super.onCreateDrawableState(extraSpace +
2);
if (isFried()) {
mergeDrawableStates(drawableState, FRIED_STATE_SET);
}
if (isBaked()) {
mergeDrawableStates(drawableState, BAKED_STATE_SET);
}
return drawableState;
}

Once this is done, you should be able to use these in
ColorStateListDrawable, but you should use your app's namespace to use these
new states:

http://schemas.android.com/apk/res/android";
xmlns:app="http://schemas.android.com/apk/res/">







On Mon, Mar 31, 2008 at 9:48 AM, Ted Hopp <[EMAIL PROTECTED]> wrote:

>
> With some searching I've found several examples and explanations of
> customizing the look of a component based on the drawing states. But I
> haven't found anything about defining custom drawing states. For
> instance, suppose I have a component that maintains states that I
> might call "baked" and "fried" and I want it's appearance to track
> these states. So I'm imagining this drawable:
>
> http://schemas.android.com/apk/res/android";>
>  state_fried="false" />
>  state_fried="true" />
>  state_fried="true" />
>  state_fried="false" />
> 
>
> Is this possible? I see that it is possible (with setState,
> mergeDrawableStates, etc.) to have custom state data, but I don't see
> how to put this to use. I can't figure out from the documentation
> whether it is even possible to define custom item state attributes in
> xml, much less how to do it and link them to the state vector. (I'm
> assuming that if this is possible, I could also mix custom attributes
> with standard ones like android:state_pressed.) A pointer to an
> example or two would be very helpful.
>
> 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Question about transparent views

2008-03-31 Thread hackbod

This is a bug that will be fixed in an future SDK.

On Mar 31, 2:53 pm, radu weiss <[EMAIL PROTECTED]> wrote:
> Hello
>
> I am using a view with a transparent background for activity A:
>
> 
> @drawable/
> transparent_background
> true
> 
>
> The problem i am having trouble solving is:
>
> I start activity A from the home screen. Activity A then launches
> activity B, using startActivity() (it's not a sub-activity). Once i
> finish using activity B, i return to activity A, but since the home
> screen has probably been paused and is no longer visible, i see the
> white and gray check board pattern behind activity A's transparent
> background.
>
> How can i find out what activity is behind Activity A so that i can
> resume it? How can i resume it while keeping Activity A in the
> foreground?
>
> regards,
> Radu
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to blur a rectangular region of the screen

2008-03-31 Thread hackbod

http://code.google.com/android/reference/android/view/WindowManager.LayoutParams.html#FLAG_BLUR_BEHIND

Set this flag on the window of your activity.

I'm not sure if this was working in M5, but if not it will be working
in an upcoming SDK.  (It did work in M3.)

On Mar 31, 3:46 pm, Cheryl Sedota <[EMAIL PROTECTED]> wrote:
> How can one blur a rectangular region of the screen (region could
> intersect with more than one activity's windows)... we are able to get
> blur working for a particular view itself by implementing a custom
> onDraw() method and Paint.setMaskFilter() --> BlurMaskFilter but can't
> figure out how to apply a blur to another activity's view.
>
> If this is just not possible, then please demonstrate how to take a
> snapshot of the screen so that we can manipulate that bitmap image as
> part of our blur activity.  I've only seen the snapshot capability
> offered on the WebView but it's a very useful utility to have for all
> views in general.
>
> Thanks,
> Cheryl
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with displaying Notification

2008-03-31 Thread hackbod

Service or receiver...  it's not clear from the original post what
they mean by "notification defined in an activity," but generally for
things happening in the background you should use the
NotificationManager API to show this information to the user in the
status bar, so they can deal with it as they want.  You can also use
the Toast class to display a briefly floating message to them that
will not interrupt their current interaction.  We definitely prefer
that you don't display an activity.

On Mar 31, 12:15 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
> It sounds like you want to use a Service.
>
> On Mar 31, 4:10 am, novice <[EMAIL PROTECTED]> wrote:
>
> > Hi ,
> >   I have a problem with notification manager. My notification is
> > defined in an activity. Hence everytime a notification comes, my
> > activity is displayed on the screen and then the notification pops up
> > in the status bar. However, This does not appear good as the user
> > might be doing something already on the screen and my activity should
> > not over ride the screen which was being displayed.
> > I want my notification in the status bar to be displayed without the
> > activity being overridden. Any suggestions?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Life cycle of activities updating a database

2008-03-31 Thread hackbod

On Mar 31, 1:38 pm, Peli <[EMAIL PROTECTED]> wrote:
> If the design philosophy is "save on back", then why does this default
> to
> RESULT_CANCELED?

Activities only return results when the caller is asking for something
-- typically the user picking an item like a contact, a media file,
etc.  When you are saving your data you are storing it in a content
provider, not returning it as a result.

> My workaround is to call "finish()" in the "onPause()" method, right
> after "setResult(...)".

You almost certainly don't want to always call finish() in onPause(),
you can be paused for many reasons: the user pressing the home button,
the device going to sleep, etc.

The key thing is that while being paused, you need to have your state
saved away so it can be recovered if the process has to be killed and
your activity later restarted.  This is one of the motivations for
using an edit-in-place model, in addition to the fact that the user
can easily be distracted from your applications (by a phone call for
example) and not return any time soon to what they were doing.
Typically this can be handled by either writing the data so far, or
storing a "draft" record that the user can go back and complete (for
example if composing an e-mail).

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Developer program with access to real test phones

2008-03-31 Thread Alex

Does Google or the open handset alliance have any plans of setting up
a developer program where application developers can have access to a
variety of real test phones? I haven't seen any information on that so
far.

Alex
khyawl.com



--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding browser supported types

2008-03-31 Thread pavan

Here are the steps to recreate the problem.
Step 1)
Create a dummy activity called Dummy.java and the code for that is
***
public class Dummy extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.dummy);

}

}
**
step 2)
create dummy.xml with this content
***



**
step 3)
edit AndroidManifest.xml to add
*












*

step 4)
deploy the activity, search and navigate to any mp3 file. You will see
the above "list view can't have unspecified size exception". For quick
test, this link could be helpful.
http://www.archive.org/download/BenWillemsTestwavTestmp3/Test_64kb.mp3.


My activity does render itself fine ( there is nothing really there in
it). When I try to open it via an intent and by hooking up the
mimetype, i get the error mentioned in this thread.
Please help.
-Pavan.

On Mar 31, 11:51 am, pavan <[EMAIL PROTECTED]> wrote:
> The stack trace is
> ***
> ERROR/AndroidRuntime(660): java.lang.RuntimeException: List views
> can't have UNSPECIFIED size
> ERROR/AndroidRuntime(660): at
> android.widget.ListView.onMeasure(ListView.java:947)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureHorizontal(LinearLayout.java:493)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:233)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2251)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 742)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureHorizontal(LinearLayout.java:510)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:233)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChildren(ViewGroup.java:2193)
> ERROR/AndroidRuntime(660): at
> android.widget.AbsoluteLayout.onMeasure(AbsoluteLayout.java:60)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
> ERROR/AndroidRuntime(660): at android.policy.PhoneWindow
> $DecorView.onMeasure(PhoneWindow.java:1202)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewRoot.performTraversals(ViewRoot.java:341)
> ERROR/AndroidRuntime(660): at
> android.view.ViewRoot.handleMessage(ViewRoot.java:584)
> ERROR/AndroidRuntime(660): at
> android.os.Handler.dispatchMessage(Handler.java:80)
> ERROR/AndroidRuntime(660): at android.os.Looper.loop(Looper.java:
> 91)
> ERROR/AndroidRuntime(660): at
> android.app.ActivityThread.main(ActivityThread.java:3052)
> ERROR/AndroidRuntime(660): at
> java.lang.reflect.Method.invokeNative(Native Method)
> ERROR/AndroidRuntime(660): at
> java.lang.reflect.Method.invoke(Method.java:356)
> ERROR/AndroidRuntime(660): at android.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:1547)
> ERROR/AndroidRuntime(660): at
> android.os.ZygoteInit.main(ZygoteInit.ja

[android-developers] How to blur a rectangular region of the screen

2008-03-31 Thread Cheryl Sedota

How can one blur a rectangular region of the screen (region could
intersect with more than one activity's windows)... we are able to get
blur working for a particular view itself by implementing a custom
onDraw() method and Paint.setMaskFilter() --> BlurMaskFilter but can't
figure out how to apply a blur to another activity's view.

If this is just not possible, then please demonstrate how to take a
snapshot of the screen so that we can manipulate that bitmap image as
part of our blur activity.  I've only seen the snapshot capability
offered on the WebView but it's a very useful utility to have for all
views in general.

Thanks,
Cheryl
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Question about transparent views

2008-03-31 Thread radu weiss

Hello

I am using a view with a transparent background for activity A:


@drawable/
transparent_background
true


The problem i am having trouble solving is:

I start activity A from the home screen. Activity A then launches
activity B, using startActivity() (it's not a sub-activity). Once i
finish using activity B, i return to activity A, but since the home
screen has probably been paused and is no longer visible, i see the
white and gray check board pattern behind activity A's transparent
background.

How can i find out what activity is behind Activity A so that i can
resume it? How can i resume it while keeping Activity A in the
foreground?

regards,
Radu


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TabActivity example?

2008-03-31 Thread garymm

turns out I needed to add the nested activities (to be contained
inside the tabs) to the Android manifest.

Thanks Josh!

On Mar 25, 8:48 pm, garymm <[EMAIL PROTECTED]> wrote:
> I'm running into problems. Whenever I select a tab (be it with setting
> a default in onCreate or not but then clicking), I get a
> NullPointerException in TabHost$IntentContetStrategy.getContentView
>
> Any idea what's up? I wouldn't mind showing you my code if you'd be so
> kind as to take a look. I tried to copy you as much as possible, but I
> seemed to have messed up somewhere.
>
> On Mar 24, 12:18 am, Josh Guilfoyle <[EMAIL PROTECTED]> wrote:
>
> > I have created another, more sophisticated example which does not
> > hardcode the layout:
>
> >http://devtcg.blogspot.com/2008/03/advanced-tab-activity-demo.html
>
> > On Mar 13, 11:30 am, Muthu Ramadoss <[EMAIL PROTECTED]> wrote:
>
> > >http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/
>
> > > On Mar 13, 1:57 pm, Ender <[EMAIL PROTECTED]> wrote:
>
> > > > Hi!
>
> > > > I was wondering if there is somebody who has already done something
> > > > with aTabActivityand/or could provide a short example of how to add
> > > > activities to aTabActivityand connect them totabs?
>
> > > > Regards,
> > > >     Ender
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] invoke an action in an already running activity

2008-03-31 Thread garymm

This seems like something that should be simple if I knew what I were
doing at all.
I have a TabHost and it has two tabs, each of which contains its own
ListActivity. I followed Josh's example here
http://devtcg.blogspot.com/2008/03/advanced-tab-activity-demo.html

How do I invoke methods on the ListActivities? It seems like maybe I
should use an intent, but the activity is already running, so I don't
want to use "startActivity". I basically want to send them search
terms and have them filter and redraw themselves, but I have no idea
how to do this.

Any help would be greatly appreciated.

Gary
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Blank screen after Activity starts

2008-03-31 Thread Dan U.

Use a Service, not an Activity.

On Mar 31, 1:45 pm, GeorgeS <[EMAIL PROTECTED]> wrote:
> I have an app which starts on RECEIVE_BOOT_COMPLETED. It checks to see
> if preferences are already set and if so starts an activity which has
> no interface but just registers to handle changes in PhoneState. This
> is all fine but the user is left starting at a blank screen and has to
> press the Home button to get to a regular screen.
>
> How can I get the Activity to get out of the way GUI-wise and let the
> Home and/or other apps show without user intervention?
>
> Thanks,
> GeorgeS
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Quality of audio sound in MediaPlayer

2008-03-31 Thread acopernicus

Has anyone found a way to play high (even 'moderate') quality audio
through the MediaPlayer?

MediaPlayer current plays my .mp3 files with incredibly low quality
sounds (even though the file is not being streamed).

Do any of the other formats sound better...MPEG 4...?

Thanks,
Anthony
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Blank screen after Activity starts

2008-03-31 Thread GeorgeS

I have an app which starts on RECEIVE_BOOT_COMPLETED. It checks to see
if preferences are already set and if so starts an activity which has
no interface but just registers to handle changes in PhoneState. This
is all fine but the user is left starting at a blank screen and has to
press the Home button to get to a regular screen.

How can I get the Activity to get out of the way GUI-wise and let the
Home and/or other apps show without user intervention?

Thanks,
GeorgeS
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Life cycle of activities updating a database

2008-03-31 Thread Peli

I also wonder what the correct implementation would be.

If the design philosophy is "save on back", then why does this default
to
RESULT_CANCELED?

My workaround is to call "finish()" in the "onPause()" method, right
after "setResult(...)".

This results in 2 calls to onActivityResult(..): One with
RESULT_CANCELED, and one with RESULT_OK with the correct bundles
passed.

Furthermore, LogCat says:
W/ActivityManager( 6246): Duplicate finish request for
HistoryRecord{4009e378 {org.openintents/
org.openintents.shopping.share.ListShareSettingsActivity}}

Since there is a warning, this can not be 100% correct, but it seems
to work. I wonder what the "correct" solution would be - to pass a
bundle from a subactivity when the user presses the back button...

Peli

On Mar 27, 5:54 am, tenacious <[EMAIL PROTECTED]> wrote:
> I've encountered this paradigm too and would also like to know why
> results can't be set as late as onPause?  Hopefully somebody
> knowledgeable can chime in...
>
> Having the differing behaviors between "confirm" and onPause() is
> causing pain because I want to have the "cancel" button act like
> confirm (the user is always saving unless explicitly clearing all
> fields or clicking a cancel/delete button)
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Loading data after first draw.

2008-03-31 Thread Megha Joshi
 Hi,

There is no callback function in the APIs that gets invoked when a MapView
is completely displayed on screen.
You may want to log a feature request in the android issue tracker for this.


Thanks,
Megha

On Mon, Mar 31, 2008 at 10:50 AM, Redhunt <[EMAIL PROTECTED]>
wrote:

>
> Hi
>
> Does any one have any thoughts on the proper way to do this:
>
> I want to create a thread to load data from the web AFTER at least one
> "frame" has been drawn on the screen. This is for a MapView, so maybe
> there is a way to instantiate a call when the map has completely drawn
> at least once?
> The MapView is contained in a MapActivity, obviously, so I could also
> add the call somewhere in the activity.
> Note: What I am looking for is the right place to instantiate a thread
> after the user at least sees a map on the screen. So if I add the call
> to the thread in OnResume in the MapActivity, for example, that would
> not work, because at that point there is nothing drawn on the screen.
> Any thoughts?
>
> Thanks in advance
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to get a GL11Ext instance to call OpenGL Extension functions?

2008-03-31 Thread Romain Guy

Hi,

Yes, a cast is all you need.

On Mon, Mar 31, 2008 at 1:09 PM, Toothy Bunny <[EMAIL PROTECTED]> wrote:
>
>  Hi Android Graphics Team,
>  I would like to call OpenGL extension function:
>  void glDrawTexiOES(int x, int y, int z, int width, int height)
>
>  to render a 2D image directly in 3D scene without bothering to use
>  OpenGL quad.
>
>  The question is, how can I get a GL11Ext instance? I could not find
>  any function to do this.
>  Does this means I can simply cast the instance returned by
>  OpenGLContext.getGL() into a GL11Ext?
>
>  Thanks,
>  Hongkun
>  www.omnigsoft.com
>
>  >
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get a GL11Ext instance to call OpenGL Extension functions?

2008-03-31 Thread Toothy Bunny

Hi Android Graphics Team,
I would like to call OpenGL extension function:
void glDrawTexiOES(int x, int y, int z, int width, int height)

to render a 2D image directly in 3D scene without bothering to use
OpenGL quad.

The question is, how can I get a GL11Ext instance? I could not find
any function to do this.
Does this means I can simply cast the instance returned by
OpenGLContext.getGL() into a GL11Ext?

Thanks,
Hongkun
www.omnigsoft.com

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Maven Plugins For Android

2008-03-31 Thread Shane Isbell

I added support for aidl a few days ago. I've also add a maven par
plugin that will package up provisioning archives (JSR-124) and you
can submit these to a JVending server for stocking of android
applications.

I've moved the code from the Apache Maven sandbox to
   http://code.google.com/p/masa
You can checkout and build:
   svn checkout http://masa.googlecode.com/svn/trunk/ masa

I plan on getting an official release out soon. If you find any bugs
or need additional features, just enter into the project tracker.

Shane

On Feb 26, 1:28 pm, androidian <[EMAIL PROTECTED]> wrote:
> Hi Shane,
>
> Does the plugin do aidl? It doesn't seem to generate a java file from
> an aidl file I have and it's breaking my build.
>
> Kai
>
> On Jan 11, 12:25 am, Shane Isbell <[EMAIL PROTECTED]> wrote:
>
>
>
> > I just did some updates to theMavenAndroidplugins. Thepluginsnow
> > include the java dependencies of a project in the main classes.dx
> > file. This means you can start pulling jar dependencies from the
> > centralMavenrepo and have them automatically compiled and packaged
> > forAndroid. Note that I've also changed the type toandroid:apk.
>
> > Shane
>
> > On Nov 15 2007, 2:32 am, baker <[EMAIL PROTECTED]> wrote:
>
> > > I'm feeling so at home withandroid, loving it. Thanks for themaven
> > > check in, will come in handy.
>
> > > On Nov 14, 9:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > I just checked inMavenplugins forandroid:
>
> > > >https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-an...
>
> > > > Read the README.txt file on how to build and use.- Hide quoted text -
>
> > > - Show quoted text -- 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to show one View inside another.

2008-03-31 Thread artv

as I see if you use AbsoluteLayout.LayoutParams, your viewParent class
must be inherited from AbsoluteLayout

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Capturing the incoming phone number when recieving a call

2008-03-31 Thread Anthony Davis

I am attempting to find a way to capture the incoming phone number
when a new call is being recieved. Is there an API available to
accomplish 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with displaying Notification

2008-03-31 Thread Dan U.

It sounds like you want to use a Service.

On Mar 31, 4:10 am, novice <[EMAIL PROTECTED]> wrote:
> Hi ,
>   I have a problem with notification manager. My notification is
> defined in an activity. Hence everytime a notification comes, my
> activity is displayed on the screen and then the notification pops up
> in the status bar. However, This does not appear good as the user
> might be doing something already on the screen and my activity should
> not over ride the screen which was being displayed.
> I want my notification in the status bar to be displayed without the
> activity being overridden. Any suggestions?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is AnimationSet really buggy?

2008-03-31 Thread Dan U.

Bump

On Mar 29, 9:42 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
> I've looked through the group and the bug tracker for problems with
> animations. I know there are apparently some issues with certain
> methods not working in various Animation classes, but I don't think
> they related to the problems I have.
>
> I'm trying to make a pulsing animation. Basically it does an alpha
> animation with both repeat and reverse. Since apparently there is no
> way to do both repeat and reverse on a single animation, I figured I
> would use an AnimationSet to do this. Here's a simple example I'm
> starting with:
>
> http://schemas.android.com/apk/res/android";
> android:shareInterpolator="true">
>
>  android:toAlpha="0.5"
> android:duration="2000"
> android:fillAfter="true"/>
>
> 
>
> If I understand this correctly, it should change my view from an alpha
> of 1.0 to an alpha of 0.5 over a period of 2 seconds and then stop. I
> run it and it fades from 1.0 to 0.0 in about 2 seconds. Does anyone
> know what is wrong?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: closing a defined subActivity/Layout

2008-03-31 Thread Dan U.

This doesn't show enough of your code. Are there any finish() calls in
your onActivityResult?

On Mar 31, 1:20 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
> Yes, i have a onActivityResult method in layout B
>
> protected void onActivityResult(int requestCode, int resultCode,
> String data, Bundle extras) {
> switch(resultCode){
> case 5 :
> ...
>
> On 31 mar, 10:06, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > Do you have an onActivityResult in B?
>
> > On Mar 31, 12:32 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I have checked my code and I think that there's nothing wrong :(.
>
> > > Layout A is calling Layout B with this :
>
> > > //included in a switch on the onMenuItemSelected method
> > > Intent i = new Intent(this, B.class);
> > > startSubActivity(i, 0);
>
> > > In the layout B I'm calling the Layout C with this code :
>
> > > //included in a setOnClickListener method
> > > Intent i = new Intent(this, C.class);
> > > startSubActivity(i, 5);
>
> > > Once in the last Layout C, I'm finishing the subActivity with this
> > > code :
>
> > > public void onClick(View v) {
> > > setResult(RESULT_OK, "C", mBdl);
> > > finish();
>
> > > }
>
> > > When I'm hitting the button, the finish() method is closing Layout C
> > > and Layout B. But I don't want to close Layout B !
>
> > > Someone have an idea ? :)
>
> > > Kind Regards,
>
> > > Olivier K.
> > > ==
>
> > > On 27 mar, 17:23, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > > The finish() method only stops the activity it is being called in.
> > > > You must be doing something unusual to cause the previous activity to
> > > > stop as well.
>
> > > > On Mar 27, 7:25 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi all,
> > > > > here is my problem.
>
> > > > > My parent layout is displaying the menu (classic).
> > > > > By hitting a menu choice, I'm displaying another Layout
> > > > > (startSubActivity) wich contains a button. By hitting this button I'm
> > > > > launching a 3rd layout
>
> > > > > (startSubActivity). In this 3rd layout I'm filling a Bundle for the
> > > > > 2nd layout.
>
> > > > > Problem when I'm finishing the 3rd layout with the finish() method the
> > > > > other one subActivity (2nd layout) is ending too.
>
> > > > > How can i close a subActivity/Layout without closing all subActivity ?
>
> > > > > Kind Regards, Olivier 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Possible to set default highlight color?

2008-03-31 Thread android_newbie

No problem. I look on the other blogs/groups.

AN

On Mar 28, 5:12 pm, hackbod <[EMAIL PROTECTED]> wrote:
> Sorry, this is now very far outside of the scope of what I can
> answer.  I am just an engineer. :)
>
> On Mar 28, 2:15 pm, android_newbie <[EMAIL PROTECTED]> wrote:
>
> > Thanks hackbod for your quick reply! I have another quick question.
>
> > We're trying to make the UI of our app look as aesthetically pleasing
> > as possible while balancing the use of limited resources on mobile
> > devices. We're considering having several different background images
> > for different screens to add aesthetic appeal. If we use a lot of
> > different background images for the competition, will we be penalized?
> > Are we supposed to demonstrate that we are taking into consideration
> > the memory and storage constraints of mobile apps for this
> > competition? or should we just try to make the application as visually
> > appealing as possible (as long as we use the standard widgets)?
>
> > Are there any size constraints on the jar/file that we submit? (Since
> > I haven't filled out the submission form yet, I'm not sure exactly
> > what files we're supposed to submit?)
>
> > Thank you again,
>
> > AN
>
> > On Mar 28, 2:36 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > No, no application will be penalized for using the standard buttons.
> > > In fact you're more likely to get penalized for putting in custom
> > > buttons that don't work on a touch screen. :}
>
> > > On Mar 28, 6:13 am, android_newbie <[EMAIL PROTECTED]> wrote:
>
> > > > Thank you for clarifying. We were going to create custom button images
> > > > for all of the buttons but it seems like you're recommending that we
> > > > don't do that? We just want to make sure that an application won't be
> > > > penalized for using the standard button widgets with the orange
> > > > background?
>
> > > > Thank you,
> > > > AN
>
> > > > On Feb 21, 12:01 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > > > On Feb 21, 8:57 am, aetmos <[EMAIL PROTECTED]> wrote:
>
> > > > > > Yeah, that's what I was trying to say above. It would be nice if 
> > > > > > there
> > > > > > were a global way to set highlight colors, though. Like, if the
> > > > > > default buttons had a number of different colors to choose from. At
> > > > > > the very least, the documentation should really make it more clear 
> > > > > > how
> > > > > > to swap out the images. It took me forever to figure out.
>
> > > > > The main mechanism we have for an application to select standard
> > > > > appearances is themes, basically letting you pick between a dark
> > > > > background and a light background.  (Though note that the current
> > > > > light backgroundthemeis not yet ready for use.)
>
> > > > > There is an interesting balancing act we need to play with the
> > > > > standard appearance, because we expect that manufacturers of
> > > > > individual devices will want tomodifythe look of the UI to some
> > > > > degree to match their hardware (either just the appearance, or things
> > > > > like you saw with M5 where the size of widgets is modified to account
> > > > > for whether or not there is a touch screen), and we also in the future
> > > > > want to support user-installed skins.
>
> > > > > Our general approach is:
>
> > > > > - Applications can decide whether they want a dark or light background
> > > > > (thetheme), and we guarantee that whatever appearance is in effect
> > > > > will match that basic design so you can pick colors and graphics that
> > > > > will work on that background.
> > > > > - The device decides the exact appearance of the standard UI elements,
> > > > > both how they look and their overall size, to match the design of the
> > > > > hardware and how the user interacts with it.  This is done by
> > > > > modifying the standard system resources.  During the design of these
> > > > > resources, careful restrictions will need to be applied to ensure that
> > > > > existing applications work well with them.
> > > > > - (Eventually) third party skins can be installed tomodifythe
> > > > > standard resources to provide different appearances on a device.
> > > > > Skins have a lot more freedom to do wild things with the appearance,
> > > > > because they are user-installed and if they cause poor interactions
> > > > > with applications they can be removed.
>
> > > > > We realize that this kind of variation in the UI causes a lot of
> > > > > complication for applications.  In general, it is best to be
> > > > > conservative with your application design: rely on the standard
> > > > > resources for the widgets and other UI elements, so you will match the
> > > > > device.  As the platform evolves and devices appear, we will be
> > > > > putting effort into ensuring that applications that use the standard
> > > > > UI elements continue to look and run well.
>
> > > > > I would certainly think twice before replacing a button's graphics
> > > > > with my own custom one.  If the

[android-developers] Re: Transfer a Serializable obj to other activity issue? how to do this?

2008-03-31 Thread Megha Joshi
Hi,

In the current release of the SDK, there is a bug that prevents
application-specific Serializable or Parecelable objects from being used in
the extras data of an Intent when starting an activity.
Also, the use of Serializable is not recommended because it is extremely
slow.

Thanks,
Megha

On Mon, Mar 31, 2008 at 10:28 AM, Android-Berry <[EMAIL PROTECTED]>
wrote:

>
> I have create a class implements Serializable,
>
> public class FormDef implements Serializable{
>   
>   
>   some string variable.
>   and some vector container holds some serializable obj.
>   ...
>   ...
> }
>
>
> call subActivity
>
>  Intent i = new Intent(this,RecordFieldScreen.class);
>  Bundle bundle = new Bundle();
>  bundle.putSerializable(ParameterDef.FORM_NAME, obj);
>  i.putExtra(ParameterDef.FORM_NAME, bundle);
>  i.putExtra(ParameterDef.VALUE_CARRY,false);
>  startSubActivity(i,ParameterDef.DETAIL_SCREEN);
>
> after exectue startSubActivity statement, it throws me an error via
> LogCat, say:
>
> DEBUG/dalvikvm(519): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> DEBUG/dalvikvm(519): NOTE: loadClass
> 'com.wallacewireless.android.forms.form.FormDef' 0x40018950 threw an
> exception
> DEBUG/dalvikvm(519): Exception Ljava/lang/RuntimeException; from
> Parcel.java:891 not caught locally
>
>
> So, How I can transfer an object to another activity?
>
> 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding browser supported types

2008-03-31 Thread pavan

The stack trace is
***
ERROR/AndroidRuntime(660): java.lang.RuntimeException: List views
can't have UNSPECIFIED size
ERROR/AndroidRuntime(660): at
android.widget.ListView.onMeasure(ListView.java:947)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.measureHorizontal(LinearLayout.java:493)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:233)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2251)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
742)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.measureHorizontal(LinearLayout.java:510)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:233)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.view.ViewGroup.measureChild(ViewGroup.java:2219)
ERROR/AndroidRuntime(660): at
android.view.ViewGroup.measureChildren(ViewGroup.java:2193)
ERROR/AndroidRuntime(660): at
android.widget.AbsoluteLayout.onMeasure(AbsoluteLayout.java:60)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.view.ViewGroup.measureChild(ViewGroup.java:2219)
ERROR/AndroidRuntime(660): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
ERROR/AndroidRuntime(660): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.view.ViewGroup.measureChild(ViewGroup.java:2219)
ERROR/AndroidRuntime(660): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.view.ViewGroup.measureChild(ViewGroup.java:2219)
ERROR/AndroidRuntime(660): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
ERROR/AndroidRuntime(660): at android.policy.PhoneWindow
$DecorView.onMeasure(PhoneWindow.java:1202)
ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
5937)
ERROR/AndroidRuntime(660): at
android.view.ViewRoot.performTraversals(ViewRoot.java:341)
ERROR/AndroidRuntime(660): at
android.view.ViewRoot.handleMessage(ViewRoot.java:584)
ERROR/AndroidRuntime(660): at
android.os.Handler.dispatchMessage(Handler.java:80)
ERROR/AndroidRuntime(660): at android.os.Looper.loop(Looper.java:
91)
ERROR/AndroidRuntime(660): at
android.app.ActivityThread.main(ActivityThread.java:3052)
ERROR/AndroidRuntime(660): at
java.lang.reflect.Method.invokeNative(Native Method)
ERROR/AndroidRuntime(660): at
java.lang.reflect.Method.invoke(Method.java:356)
ERROR/AndroidRuntime(660): at android.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:1547)
ERROR/AndroidRuntime(660): at
android.os.ZygoteInit.main(ZygoteInit.java:1445)
ERROR/AndroidRuntime(660): at
android.dalvik.NativeStart.main(Native Method)
***
My code hasn't been called yet.
On Mar 30, 9:45 pm, pavan <[EMAIL PROTECTED]> wrote:
> I am running into exactly the same issue. App runs fine from eclipse
> or when the resource path ( path to the downloaded file in sdcard) is
> specified. But when launched from the browser, I get the exact same
> stack trace. None of my activities uses listviews si I am sure the
> problem lies somewhere else.Pavan.
> On Feb 20, 10:57 am, baldmountain <[EMAIL PROTECTED]> wrote:
>
> > A bit more information.
>
> > Based on a post in another thread I tried adding the BROWSABLE
> > category to my intent filter but that didn't seem to change anything.
>
> > I also tried adding the SYSTEM_INTERNAL_WINDOW permission in case my
> > app didn'thavethe correct permission with no effect.
>
> > The more I think about it, the more sure I am that none of my code is
> > running.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.htm

[android-developers] Re: Is there a memory threshhold after which ActivityManager starts removing activities from the stack?

2008-03-31 Thread hackbod

The activity manager does not remove activities based on their size.
The kernel kills processes based on their current state (foreground/
background) and the overall memory available in the system, but the
activity manager remembers their frozen state so that when the user
returns to an activity in the killed process, a new process can be
created and the activity restarted with its previous state.

Unless otherwise specified, all activities in a .apk run in their own,
dedicated process, so they will all be killed together.

I don't know why you would  be seeing the behavior you are describing.

On Mar 31, 6:53 am, Chris D <[EMAIL PROTECTED]> wrote:
> In my application, almost all of my activities will return all the way
> back to the main activity. Only two will not. Those are two rather
> heavy activities. I'm watching the ActivityManager kill off the main
> activity after I launch those two heavy activities. Is this by design?
> Should I start putting "return to home" menu options in all my
> activities?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout_Weight wierdness with ListView and Buttons (within vertical orientation LinearLayout)

2008-03-31 Thread Megha Joshi
Hi Ram,

You should not be using wrap_content on the ListView but rather
layout_height="0dip".

Thanks,
Megha

On Mon, Mar 31, 2008 at 10:39 AM, Ram <[EMAIL PROTECTED]> wrote:

>
> *bump*
>
> On Mar 30, 1:00 am, Ram <[EMAIL PROTECTED]> wrote:
> > Hi, I'm trying to create a screen with a listview and two buttons on
> > it.
> >
> > I tried the following combination in main.xml and it seemed to work
> > right (with the listview taking up ~80% of the height and the two
> > buttons ~10% each)
> >
> > http://schemas.android.com/apk/res/
> > android"
> > android:orientation="vertical"
> > android:layout_width="fill_parent"
> > android:layout_height="fill_parent"
> > ...
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content"
> > android:layout_weight="0.8" .
> >
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content"
> > android:layout_weight="0.1"  and similarly for button2
> > 
> > Then, I tried increasing the button weights to 0.3 each and I reduced
> > the listview weight to 0.4.
> >
> > With these changes, my expectation was that the listview would take
> > 40% of the screen height and that the buttons would take 30% each.
> > However, after the changes, the listview took up even more space than
> > before. So I could see more list elements on the first screen now
> > (though the listview weight was now only 40% and it had been 80%
> > earlier)
> >  The two buttons shrunk in height and so the button text wasn't
> > drawn
> >
> > Does anyone know why increasing the layout_weight of the two buttons
> > (from 10% to 30% each) decreased the height of the buttons (and why
> > decreasing the layout_weight of the listview increased its height)
> >
> > Thanks Ram
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: status bar

2008-03-31 Thread hackbod

You could just have a a standard view showing this information, which
is included in the layout of each of your activities.

On Mar 31, 11:04 am, dr123 <[EMAIL PROTECTED]> wrote:
> any idea how i can have a "permanent" view independent of activities
> much lika a status bar on a windows program (not the mobile phone's
> status bar with icons).
> It is meant to have info about the program status and the user's
> points for example and that can be updated from a service.
>
> I thought about having an activity that is constant and have all the
> other activites with less height value so that the first is visible,
> but it doesn't sound like a good idea :P
>
> any thoughts?
>
> thanks,
> aris
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] status bar

2008-03-31 Thread dr123

any idea how i can have a "permanent" view independent of activities
much lika a status bar on a windows program (not the mobile phone's
status bar with icons).
It is meant to have info about the program status and the user's
points for example and that can be updated from a service.

I thought about having an activity that is constant and have all the
other activites with less height value so that the first is visible,
but it doesn't sound like a good idea :P

any thoughts?

thanks,
aris

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Loading data after first draw.

2008-03-31 Thread Redhunt

Hi

Does any one have any thoughts on the proper way to do this:

I want to create a thread to load data from the web AFTER at least one
"frame" has been drawn on the screen. This is for a MapView, so maybe
there is a way to instantiate a call when the map has completely drawn
at least once?
The MapView is contained in a MapActivity, obviously, so I could also
add the call somewhere in the activity.
Note: What I am looking for is the right place to instantiate a thread
after the user at least sees a map on the screen. So if I add the call
to the thread in OnResume in the MapActivity, for example, that would
not work, because at that point there is nothing drawn on the screen.
Any thoughts?

Thanks in advance
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PC restarts when launching the emulator

2008-03-31 Thread Digit
wow, I'm glad that this solved it. in case you still want audio output to
work, try defining the following environment variable before starting the
emulator:

   set QEMU_AUDIO_IN_DRV=none

this will disable the Windows wave input audio driver, while still using
wave output (like M3) did. if this doesn't work, let me know too.

could you tell us more about your hardware and OS version ? which sound card
do you have, what driver is it using, which version, on which OS version
exactly ? this will help us diagnose the problem in the future.

I don't think there is anything we can do here, the emulator only does
normal Win32 API calls like waveInOpen() et al. these are certainly not
supposed to reboot your machine.

regarding the error messages:

"could not find \tools\adb.exe" is printed by the Eclipse plugin when you
don't setup the SDK path normally

"[adb] * daemon not running. starting it now" is printed by the adb tool
when it detects that the ADB server (i.e. the adb.exe background daemon) is
not running. this is not an error message, just a normal one but it's good
to print it for diagnostic reasons.

a bug would be a message like "[adb] failed to start server" though

On Mon, Mar 31, 2008 at 12:29 AM, AMGG <[EMAIL PROTECTED]> wrote:

>
> That's it!!
> Launching the emulator with the -noaudio solves the problem.
>
> About the error message "could not find \tools\adb.exe", the path was
> set correctly, but I was having some error messages related with adb
> ("adb] * daemon not running. starting it now") so I though that may be
> it could be related.
>
> Many thanks!!
>
>
>
>
> On 28 mar, 22:12, Digit <[EMAIL PROTECTED]> wrote:
> > ok, first the "could not find \tools\adb.exe" error message indicates
> that
> > you did not setup your SDK installation path in the plugin's preferences
> > panel.
> > that's why the plugin is searching the root directory for the adb
> executable
> > (and doesn't find it). this should be unrelated to your restart.
> >
> > a hard reboot is a nasty thing that can only be generated by a flaky
> > hardware or driver. it's difficult to know why here, but one difference
> > between the M5 and M3 emulator binaries is that the former tries to open
> the
> > Windows wave input at startup to implement audio recording (this feature
> is
> > however still broken in M5 for reasons to lenghty to explain there).
> maybe
> > this is triggering something in your system. can you try starting the
> > emulator from the command-line with "emulator -noaudio" to see if this
> > changes anything ?
> >
> > On Fri, Mar 28, 2008 at 12:43 PM, AMGG <[EMAIL PROTECTED]> wrote:
> >
> > > It's a hard reboot.
> >
> > > So do u think that may be the problem belongs to the computer?
> >
> > > Because I haven't seen any system adverts, the system restarts and
> > > nothing seems to be wrong.
> >
> > > The only thing that seems to be wrong is the adb plugin. This is the
> > > only related thing I have read about (see the error messages I mention
> > > in the previous posts).
> >
> > > [2008-03-27 14:57:19 - adb] Failed to get the adb version: Cannot run
> > > program "\tools\adb.exe": CreateProcess error=3, The system cannot
> > > find the path specified
> > > [2008-03-27 14:58:17 - adb] * daemon not running. starting it now *
> > > [2008-03-27 15:48:12 - DeviceMonitor] Connection attempts: 1
> > > [2008-03-27 15:48:14 - adb] * daemon not running. starting it now *
> >
> > > I think it should be some kind of incompatibility between my system
> > > and m5, because before to install m5 all was running properly. Or some
> > > problem with the adb plugin which makes my computer to crash... really
> > > weird.
> >
> > > About the logs... do you mean system.log?  I will take a look on
> > > Monday (its the company pc)
> >
> > > Thanks!
> >
> > > On 28 mar, 17:47, Digit <[EMAIL PROTECTED]> wrote:
> > > > as said previously, there is no good reason for this to happen. the
> > > emulator
> > > > is a normal application and never sends any message to Windows to
> order
> > > a
> > > > restart the machine. and since we can't reproduce it, can you
> provide us
> > > > with some additionnal details:
> >
> > > > - is this a "hard reboot", i.e. the computer restarts immediately.
> By
> > > > contrast, with a "graceful restart", you will see all applications
> > > windows
> > > > closing, then the Windows shell exiting, then a few seconds where
> the
> > > > computer shut downs properly with only the "login background".
> > > > or do you see the blue screen of death ?
> >
> > > > - is there anything in the system logs that indicate a fatal error
> or
> > > the
> > > > reason for the restart ?
> > > > there probably is something there that should explain what's
> happening
> >
> > > > On Fri, Mar 28, 2008 at 9:46 AM, AMGG <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi ,
> >
> > > > > I have updated Android SDK from M3 to M5, each time I start the
> > > > > emulator, my computer restarts. Can somebody please help me?
> >
> > > > > Ye

[android-developers] Re: over my head with data please help

2008-03-31 Thread dr123

thank you anthony, that's what i did there was no other way...
i have the user type in some letters and then try a LIKE %string%
search...

I hope this also help others cause the country/city thing is something
common.

On 31 Μαρ, 18:22, acopernicus <[EMAIL PROTECTED]> wrote:
> Here's an excellent ListView example with code for paging through
> large #'s of items.  It's very similar to the music list in iTunes on
> the iPhone.
>
> http://devtcg.blogspot.com/2008/03/custom-android-list-view-widget-to...
>
> Given that you have 18,000 entries though, I recommend a search field
> with auto-population of options based on queries back to the server.
> I.e. have user type a letter and then display only cities beginning
> with that letter.
>
> Best of luck,
> Anthony
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Permanent Scrollbars?

2008-03-31 Thread Ram

I think the listview doesn't offer any method/property to make the
scrollbar always visible. This seems like an Android design decision.
I

On Mar 30, 1:37 am, peter <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is there a way to make scrollbars permanent?
>
> In other words, I would like the scrollbar on the side to always be
> visible instead of only showing up when the user begins to scroll.
>
> Thanks in advanced,
> Peter
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout_Weight wierdness with ListView and Buttons (within vertical orientation LinearLayout)

2008-03-31 Thread Ram

*bump*

On Mar 30, 1:00 am, Ram <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to create a screen with a listview and two buttons on
> it.
>
> I tried the following combination in main.xml and it seemed to work
> right (with the listview taking up ~80% of the height and the two
> buttons ~10% each)
>
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> ...
>      android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>         android:layout_weight="0.8" .
>
>              android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>         android:layout_weight="0.1"  and similarly for button2
> 
> Then, I tried increasing the button weights to 0.3 each and I reduced
> the listview weight to 0.4.
>
> With these changes, my expectation was that the listview would take
> 40% of the screen height and that the buttons would take 30% each.
> However, after the changes, the listview took up even more space than
> before. So I could see more list elements on the first screen now
> (though the listview weight was now only 40% and it had been 80%
> earlier)
>      The two buttons shrunk in height and so the button text wasn't
> drawn
>
> Does anyone know why increasing the layout_weight of the two buttons
> (from 10% to 30% each) decreased the height of the buttons (and why
> decreasing the layout_weight of the listview increased its height)
>
> Thanks Ram
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout_Weight wierdness with ListView and Buttons (within vertical orientation LinearLayout)

2008-03-31 Thread Ram

*bump*

On Mar 30, 1:00 am, Ram <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to create a screen with a listview and two buttons on
> it.
>
> I tried the following combination in main.xml and it seemed to work
> right (with the listview taking up ~80% of the height and the two
> buttons ~10% each)
>
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> ...
>      android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>         android:layout_weight="0.8" .
>
>              android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>         android:layout_weight="0.1"  and similarly for button2
> 
> Then, I tried increasing the button weights to 0.3 each and I reduced
> the listview weight to 0.4.
>
> With these changes, my expectation was that the listview would take
> 40% of the screen height and that the buttons would take 30% each.
> However, after the changes, the listview took up even more space than
> before. So I could see more list elements on the first screen now
> (though the listview weight was now only 40% and it had been 80%
> earlier)
>      The two buttons shrunk in height and so the button text wasn't
> drawn
>
> Does anyone know why increasing the layout_weight of the two buttons
> (from 10% to 30% each) decreased the height of the buttons (and why
> decreasing the layout_weight of the listview increased its height)
>
> Thanks Ram
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unresolved symbols & JNI

2008-03-31 Thread Digit
thanks, this is enough information for me to understand and propose you a
solution.

it turns out that I can trivially compile and run a program that contains
the example functions definitions you gave previously. this picked my
curiousity and took a deeper look at how things work and are built in our
platform. and boy, do things look a bit different from what I thought
initially.


   - all the __aeabi_ functions are part of a companion library called
   "libgcc" (http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html)
   that comes with your toolchain. more exactly,  your toolchain comes
   with several versions of libgcc, which depend on which
   compiler options you're using. the one we used is the one returned by
   the following command:

  arm-none-linux-gnueabi-gcc -mthumb-interwork
-print-libgcc-file-name

   - when you create an executable (either static or dynamic) *or* a
   shared library, link it to this libgcc.a. this means that the aeabi
   functions required by the executable/library are directly copied into it.
   yes, this also means that these functions will be duplicated in the process
   space of a program that links to several shared libraries requiring them.
   note that libgcc.a must appear last in your link command.

this explains why there are some eabi functions in the C library, but not
all of them, or in the linker, or in many other libraries. these multiple
definitions will not conflict since the linker will resolve the symbol to
the first one it finds when needed (and all functions are identical). My
belief that the linker provided all the functions and linked them at runtime
was essentially wrong.

I don't know exactly why we're doing it this way, but I'll ask the system
guys. My first guess would be that we do that mainly for performance reasons
(a direct function call is significantly faster than a PLT trampoline jump,
even after lazy relocation being performed, and many of these functions are
tiny but crucial for 64-bit support, floating-point emulation, and even
straight integer division)

On Mon, Mar 31, 2008 at 3:54 AM, David Given <[EMAIL PROTECTED]> wrote:

>
> Digit wrote:
> > we have our own C library that we wrote by porting parts of the BSD C
> > library on top the Linux kernel.
> > but it conforms to the ARM EABI and you can trivially see that our own
> > system libraries refer to these kind of symbols dynamically too.
>
> Okay, here's some C code that provokes this:
>
> ---snip---
> unsigned int f2uiz(float f) { return (unsigned int) f; }
> signed long long lasr(signed long long v, int s) { return v >> s; }
> unsigned long long llsr(unsigned long long v, int s) { return v >> s; }
> unsigned long long llsl(unsigned long long v, int s) { return v << s; }
> ---snip---
>
> Each function, when compiled, generates a call to the appropriate
> __aeabi_* function:
>
> ---snip---
> f2uiz:
>stmfd   sp!, {r4, lr}
>bl  __aeabi_f2uiz(PLT)
>ldmfd   sp!, {r4, pc}
> ---snip---
>
> However, the libc contains only the following _aeabi_f2* functions:
>
> __aeabi_f2d
> __aeabi_f2iz
> __aeabi_f2lz
> __aeabi_f2ulz
>
> __aeabi_f2uiz is documented in ARM's ABI helper function document
> (
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043a/IHI0043A_rtabi.pdf
> ).
>
> I'm compiling the code above with:
>
> arm-none-linux-gnueabi-gcc -std=c99 -Os -fPIC test.c -o test.s -S
> -mcpu=arm926ej-s
>
> I'm getting the list of symbols from the libc with:
>
> arm-none-linux-gnueabi-gcc -T libc.so
>
> Is this enough information to duplicate, or is there anything else you
> need? (And would this be better off on -internals?)
>
> --
> David Given
> [EMAIL PROTECTED]
>
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Transfer a Serializable obj to other activity issue? how to do this?

2008-03-31 Thread Android-Berry

I have create a class implements Serializable,

public class FormDef implements Serializable{
   
   
   some string variable.
   and some vector container holds some serializable obj.
   ...
   ...
}


call subActivity

 Intent i = new Intent(this,RecordFieldScreen.class);
 Bundle bundle = new Bundle();
 bundle.putSerializable(ParameterDef.FORM_NAME, obj);
 i.putExtra(ParameterDef.FORM_NAME, bundle);
 i.putExtra(ParameterDef.VALUE_CARRY,false);
 startSubActivity(i,ParameterDef.DETAIL_SCREEN);

after exectue startSubActivity statement, it throws me an error via
LogCat, say:

DEBUG/dalvikvm(519): Exception Ljava/lang/ClassNotFoundException; from
PathClassLoader.java:205 not caught locally
DEBUG/dalvikvm(519): NOTE: loadClass
'com.wallacewireless.android.forms.form.FormDef' 0x40018950 threw an
exception
DEBUG/dalvikvm(519): Exception Ljava/lang/RuntimeException; from
Parcel.java:891 not caught locally


So, How I can transfer an object to another activity?

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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to post a new key event?

2008-03-31 Thread Cheryl Sedota

I opened a bug report to track this: 
http://code.google.com/p/android/issues/detail?id=578

On Mar 26, 4:29 pm, Cheryl Sedota <[EMAIL PROTECTED]> wrote:
> Hi, I am not trying to listen for the "onKeyDown" event in my keyboard
> view class or keyboard activity - I want the EditText control that is
> in the same viewgroup as my keyboard view to listen for and respond to
> it.  Do I have to explicitly set EditText views as focusable?  I
> wouldn't think so because I can type on the Android off-screen
> keyboard and the text shows up in the EditText view just fine.
>
> On Mar 26, 3:50 pm, Rui Martins <[EMAIL PROTECTED]> wrote:
>
> > Is your keyboard event handle, "onKeyDown(...) method, returning the
> > correct values when they process a specific key ?
> > Do you call the super.onKeyDown(...)  and return it's result, when you
> > don't process a key that you don't recognize ?
>
> > Does commenting the onKeyDown(...) method make the EditText Control,
> > work correctly again ?
>
> > Maybe you are just forgetting to call the following on your view:
>
> >         setFocusable( true ); // Make sure we get keys
>
> > NOTE: without Focus you don't receive any keyboard input !
>
> > On 26 mar, 18:26, Cheryl Sedota <[EMAIL PROTECTED]> wrote:
>
> > > I am developing an on-screen keyboard activity and need to post a key
> > > event to Android.  I can't figure out how to do it.
>
> > > I've intercepted some key events to see what Android methods are on
> > > the stack, and it seems that I need to call getParent() from my view
> > > until I get to the view root (android.view.ViewRoot, which is not an
> > > accessible class in Android application code) and then call this
> > > method:
>
> > >    public void dispatchKey(KeyEvent event)
>
> > > ... I tried calling that method on my view root object using java
> > > reflection and passed the key event object that I created.  That call
> > > was successful but no new text shows up in my EditText control which
> > > is located within the keyboard activity.
>
> > > My first goal is for the EditText control that is located within the
> > > keyboard activity (which maintains focus even while the key image is
> > > pressed) to show the text that I have entered using the keyboard.
>
> > > My second goal is for an EditText control that is in the Activity
> > > behind my keyboard activity to show the text that I have entered using
> > > the keyboard.
>
> > > I appreciate any help anyone can provide!!
> > > Cheryl- 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What attribute replaced menuItemBackground in the m5 emulator?

2008-03-31 Thread Cheryl Sedota

I opened a bug to track this issue: 
http://code.google.com/p/android/issues/detail?id=577


On Mar 25, 5:09 pm, Cheryl Sedota <[EMAIL PROTECTED]> wrote:
> This post (which is closed to further 
> posts):http://groups.google.com/group/android-developers/browse_thread/threa...
>
> ... suggests that the "menuItemBackground" attribute can be specified
> in the theme in order to change the background image that is shown
> when a list item is selected (it's orange by default in the current m5
> SDK).
>
> However, that theme attribute got removed in the m5 SDK.  Please
> advise how to get rid of the orange background image that shows up
> when a list item is clicked.
>
> Thanks,
> Cheryl
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Running Multiple Instances of the Emulator

2008-03-31 Thread Digit
hello,

I assume that you're using M3, since running multiple instances on Windows
is only supported since M5.
(the documentation you point to is for the latest SDK release)

if you have a M3, then unfortunately both emulators will listen to the same
ADB ports, resulting in the problem you're seeing (thanks for SO_REUSEADDR
being so broken and useless in Winsock). this doesn't happen on Linux or OS
X however, but M5 has the necessary fixes...

On Mon, Mar 31, 2008 at 5:31 AM, ferrybaaske <[EMAIL PROTECTED]>
wrote:

>
> -- my scenario --
> I tried to start two instances of the android emulator by the
> following commands (windows xp):
> start emulator -console -verbose -verbosekeys -logcat "out" -data db/
> instance1
> start emulator -console -verbose -verbosekeys -logcat "out" -data db/
> instance2
>
> On first console, I see the following output:
> emulator: opening read/write file 'db/instance1'
> emulator: control console listening on port 5554, ADB on port 
>
> On second console, I see the following output:
> emulator: opening read/write file 'db/instance2'
> emulator: control console listening on port 5554, ADB on port 
>
> After both instances are started, I typed "adb devices" and got the
> following message:
> List of devices attached
> 1   emulator-tcp-   device  0
>
> Installing an application does work only on first instance:
> adb -d 1 install bin/myapp.apk
> 382 KB/s (0 bytes in 366804.000s)
>
> -- my problem --
> I am not able to install the application on the second instance,
> because both instances running on same ADB port and the second
> instance has no unique [ID] to access it (e.g. calling "adb -d [ID]
> install bin/myapp.apk").
>
> -- my questions --
> Has anyone an idea how to fix the problem?
> How I can force the emulator to use an unique ADB port or unique ID
> for each instance?
>
> -- reference documentation --
> http://code.google.com/android/reference/emulator.html#multipleinstances
> http://code.google.com/android/reference/adb.html#directingcommands
>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to update the UI from a timer

2008-03-31 Thread DanAtAndroid

The only way to do this is with a handler as mentioned a few times
above already.


On Mar 31, 12:41 pm, Phision <[EMAIL PROTECTED]> wrote:
> I think I have the same problem. I want to update a progress bar at a
> regular interval of time. I am calling setProgress() each second but
> the progress bar will not redraw itself.
> I tried to call postInvalidate after setProgress and it works BUT only
> if I give a constant value to setProgress (for example
> setProgress(14)). When I give the value I want (which is one media
> player's position) it does not redraw itself
> I see that I shall try the approach, mentioned here - with handlers -
> but anyway is there anyone that can explain me why this happens?
> Here is my code of the timer:
>
> public class KalinTask extends TimerTask {
> private TrackProgress p;
> private MediaPlayer mp;
>
> public KalinTask(TrackProgress _p, MediaPlayer _mp){
> p = _p; mp = _mp;
> p.setProgress(5);
> }
>
> @Override
> public void run() {
> Log.e("upl", "Run: "+ p.getProgress());
> p.setProgress((mp.getCurrentPosition()*100)/mp.getDuration());
> p.postInvalidate();
> }
>
> }
>
> Regards, Kalin
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to show one View inside another.

2008-03-31 Thread Jorge

It works, thanks !!!
But now I got another issue.
Where do I have to put viewChild.getWith()? because I am always
getting 0 or viewParent size, it depends on where I put it.

viewParent.onDraw()
{
   viewChild.getWidth()  // Here I got viewParent size
}

viewParent.onLayout()
viewParent.onDraw()
{
   viewChild.getWidth()  // Here I got 0
}

Thanks again.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Custom drawing states possible?

2008-03-31 Thread Ted Hopp

With some searching I've found several examples and explanations of
customizing the look of a component based on the drawing states. But I
haven't found anything about defining custom drawing states. For
instance, suppose I have a component that maintains states that I
might call "baked" and "fried" and I want it's appearance to track
these states. So I'm imagining this drawable:

http://schemas.android.com/apk/res/android";>






Is this possible? I see that it is possible (with setState,
mergeDrawableStates, etc.) to have custom state data, but I don't see
how to put this to use. I can't figure out from the documentation
whether it is even possible to define custom item state attributes in
xml, much less how to do it and link them to the state vector. (I'm
assuming that if this is possible, I could also mix custom attributes
with standard ones like android:state_pressed.) A pointer to an
example or two would be very helpful.

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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to update the UI from a timer

2008-03-31 Thread Phision

I think I have the same problem. I want to update a progress bar at a
regular interval of time. I am calling setProgress() each second but
the progress bar will not redraw itself.
I tried to call postInvalidate after setProgress and it works BUT only
if I give a constant value to setProgress (for example
setProgress(14)). When I give the value I want (which is one media
player's position) it does not redraw itself
I see that I shall try the approach, mentioned here - with handlers -
but anyway is there anyone that can explain me why this happens?
Here is my code of the timer:


public class KalinTask extends TimerTask {
private TrackProgress p;
private MediaPlayer mp;

public KalinTask(TrackProgress _p, MediaPlayer _mp){
p = _p; mp = _mp;
p.setProgress(5);
}

@Override
public void run() {
Log.e("upl", "Run: "+ p.getProgress());
p.setProgress((mp.getCurrentPosition()*100)/mp.getDuration());
p.postInvalidate();
}


}


Regards, Kalin
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: suggestion: the *relevant* context should be automatically accessible from any method

2008-03-31 Thread hackbod

That is not true, all of the activities (and intent receivers and
services) are called in the main thread of the process they are
running in.  Also, calls to service interfaces and content providers
are executed in the calling thread, not their own thread.

On Mar 31, 8:51 am, Anil <[EMAIL PROTECTED]> wrote:
> NOTE: I could be mistaken in my facts below. Please correct me if I am
> wrong.
>
> As per my understanding, a running thread exists in only one Activity
> at a
> time. In other words, it is not shared by activities. Hence only one
> context applies, even if the method is in some other class. However it
> is
> convoluted to access the context - it has to be passed into each
> constructor of each class. There have been several gripes about this
> in the
> newsgroup.
> Suggestion: have a getContext() call, that at runtime senses which is
> the
> applicable context for that thread, and returns it to that thread.
> And more than one thread being spawned off should still map to one
> activity context.
> So depending on the thread (Activity) in which the method executes, a
> different context could be returned.
> thanks,
> Anil
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Disable Log for Release

2008-03-31 Thread hackbod

The most efficient is to have a static final boolean SHOW_LOGS = {true|
false} somewhere, and check this every time you are going to call
Log.foo():

if (MyGlobals.SHOW_LOGS) Log.d("Me", "I am logging").

This allows all of the logging code to be stripped from the
executable.

On Mar 29, 5:27 am, "lruckhaber" <[EMAIL PROTECTED]> wrote:
> How can iam disable the Log outputs for the release-apk?
>
> lars
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: closing a defined subActivity/Layout

2008-03-31 Thread hackbod

There are tons and tons of examples in the sample code of doing this
kind of thing...  what is different about your code?  Try removing
parts of the code (for example the onActivityResult(), the
setResult(), use startActivity() instead of startSubActivity()) to
narrow down what aspect is causing the problem.

Also there may be interesting information in the log, so take a look
there for clues.

On Mar 31, 6:45 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
> I have tried to return to the Layout B via emulator's back key (white
> return arrow) and the result is the same.
> The Layout B is vanished !
> This problem really interfere the progression of my application and I
> don't see any other idea to handle this :(.
>
> Kind Regards
>
> Olivier K.
>
> On 31 mar, 10:06, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > Do you have an onActivityResult in B?
>
> > On Mar 31, 12:32 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I have checked my code and I think that there's nothing wrong :(.
>
> > > Layout A is calling Layout B with this :
>
> > > //included in a switch on the onMenuItemSelected method
> > > Intent i = new Intent(this, B.class);
> > > startSubActivity(i, 0);
>
> > > In the layout B I'm calling the Layout C with this code :
>
> > > //included in a setOnClickListener method
> > > Intent i = new Intent(this, C.class);
> > > startSubActivity(i, 5);
>
> > > Once in the last Layout C, I'm finishing the subActivity with this
> > > code :
>
> > > public void onClick(View v) {
> > > setResult(RESULT_OK, "C", mBdl);
> > > finish();
>
> > > }
>
> > > When I'm hitting the button, the finish() method is closing Layout C
> > > and Layout B. But I don't want to close Layout B !
>
> > > Someone have an idea ? :)
>
> > > Kind Regards,
>
> > > Olivier K.
> > > ==
>
> > > On 27 mar, 17:23, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > > The finish() method only stops the activity it is being called in.
> > > > You must be doing something unusual to cause the previous activity to
> > > > stop as well.
>
> > > > On Mar 27, 7:25 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi all,
> > > > > here is my problem.
>
> > > > > My parent layout is displaying the menu (classic).
> > > > > By hitting a menu choice, I'm displaying another Layout
> > > > > (startSubActivity) wich contains a button. By hitting this button I'm
> > > > > launching a 3rd layout
>
> > > > > (startSubActivity). In this 3rd layout I'm filling a Bundle for the
> > > > > 2nd layout.
>
> > > > > Problem when I'm finishing the 3rd layout with the finish() method the
> > > > > other one subActivity (2nd layout) is ending too.
>
> > > > > How can i close a subActivity/Layout without closing all subActivity ?
>
> > > > > Kind Regards, Olivier 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GTalk subscription requests broken ..

2008-03-31 Thread jarsj

Bump. I need to know this as well ? Were you able to find a
workaround ?

regards,
harsh

On Mar 28, 8:19 pm, writser <[EMAIL PROTECTED]> wrote:
> For the sake of completeness: this is some code that looks for new
> subscription / invite events:
>
> Handler handler = new Handler();
> ContentObserver co1 = new ContentObserver(handler) {
>   @Override
>   public void onChange(boolean selfChange) {
> super.onChange(selfChange);
> Toast.makeText(Friends.this, "subscriptions updated",
> Toast.LENGTH_LONG);
>   }};
>
> getContentResolver().registerContentObserver(android.provider.Im.Subscriptions.CONTENT_URI,
> true, co1);
>
> ContentObserver co2 = new ContentObserver(handler) {
>   @Override
>   public void onChange(boolean selfChange) {
> super.onChange(selfChange);
> Toast.makeText(Friends.this, "invitations updated",
> Toast.LENGTH_LONG);
>   }};
>
> getContentResolver().registerContentObserver(android.provider.Im.Invitation.CONTENT_URI,
> true, co2);
>
> No Toasts are ever displayed ..
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] suggestion: the *relevant* context should be automatically accessible from any method

2008-03-31 Thread Anil

NOTE: I could be mistaken in my facts below. Please correct me if I am
wrong.

As per my understanding, a running thread exists in only one Activity
at a
time. In other words, it is not shared by activities. Hence only one
context applies, even if the method is in some other class. However it
is
convoluted to access the context - it has to be passed into each
constructor of each class. There have been several gripes about this
in the
newsgroup.
Suggestion: have a getContext() call, that at runtime senses which is
the
applicable context for that thread, and returns it to that thread.
And more than one thread being spawned off should still map to one
activity context.
So depending on the thread (Activity) in which the method executes, a
different context could be returned.
thanks,
Anil
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to change the color of the title bar?

2008-03-31 Thread Ken

Hi there,

1) Does anyone know how to change the color of the title bar?

2) For a more general question, where can I find the list of items
that I can change inside the  tags?
Example: