[android-beginners] To get the datas as list view from webservice

2010-05-05 Thread Anna Rose
Hai,

I am a beginer in the fied of android.I just trying to develop an
application.Now my problem is that  i want to see the datas  collected
from the data base using websevice SOAP method as  ListView .Now it is
in TextVew. Please somebody help me..

Thanks in  advance..

Here is my code:

package grid.test;
import java.util.Vector;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import grid.test.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.view.*;

import android.widget.TextView;

public class screen2 extends Activity
{

/** Called when the activity is first created. */
private static final String SOAP_ACTION = "getMessage";
private static final String METHOD_NAME = "getMessage";
private static final String NAMESPACE = "";
// ! IMPORTANT! THE URL OF THE CoLDFUSION WEBSERVER NOT
LOCALHOST BECAUSE LOCALHOST IS THE ANDROID EMULATOR !

   public void onCreate(Bundle icicle)
   {

  super.onCreate(icicle);
  setContentView(R.layout.screen2);
  Bundle extras = getIntent().getExtras();
  TextView tv = new TextView(this);

  tv.setText(extras.getString("keyName"));

  TextView mytitletext = (TextView) findViewById(R.id.text);
  mytitletext.setText(extras.getString("keyName"));
  final String URL = "http://www.bestindiancooking.com/
get_user_submitted_recipes.php?id="+extras.getString("keyName");


//CALL the web service method with the two parameters vname and
nname
  SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("nname", "Christian");
request.addProperty("itemdescription", "Braun");


  SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
  envelope.setOutputSoapObject(request);
  AndroidHttpTransport androidHttpTransport = new
AndroidHttpTransport (URL);
  try {
androidHttpTransport.call(SOAP_ACTION, envelope);

// Get the SAOP Envelope back and the extract the body
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;

Vector  = (Vector)
resultsRequestSOAP.getProperty("getMessageReturn");

 //Count of the arrays beneath starting from 0
//You can see the buildup with the php site with nusoap
http://localhost/DA/nusoapclient_test2.php
int testat = .size();

// It depends on how many arrays we  have we can get to the
attributs of one of them with get(0), get(1) 
Integer i;
String rec_count;

SoapObject test_cnt = (SoapObject) .get(0);
rec_count= (String) test_cnt.getProperty("ncount");


 
((TextView)findViewById(R.id.lblStatus)).append(rec_count.toString()
+"\n");


   for(i=1;i< 10;i++)
{

SoapObject test = (SoapObject) .get(i);

String rec_name,preparation_time;


rec_name=(String) test.getProperty("recipe_name");
preparation_time=(String)
test.getProperty("preparation_time");


 
((TextView)findViewById(R.id.lblStatus)).append(rec_name.toString()
+"\t");
 
((TextView)findViewById(R.id.lblStatus)).append(preparation_time.toString()
+"\n");


}



  } catch(Exception E) {

((TextView)findViewById(R.id.lblStatus)).setText("ERROR:" +
E.getClass().getName() + ": " + E.getMessage()+"error");

  }



  Button b = (Button) findViewById(R.id.btnClick2);
  b.setOnClickListener(new View.OnClickListener() {
 public void onClick(View arg0) {

 setResult(RESULT_OK);
 finish();
 }
  });


   }

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] About maintaining the state of the activity on orientation change

2010-05-05 Thread ameya dandekar
Hi
  I am new to androidi m currently working on landscape mode for android
app in which i want to know
  how to maintain the state of the activity and views displayed on
orientation change i.e from portrait mode to landscape mode ?

Regards,
Ameya

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Tabbed UI

2010-05-05 Thread Raul Martinez
i really need help figuring the tab ui tutorial, i dont understand how to
make the three activities

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Your feedback on Samples/Tutorials/Articles

2010-05-05 Thread Raul Martinez
it would be awesome if there were video tutorials

On Mar 18, 5:38 pm, Megha Joshi  wrote:
> Hi everyone,
>
> As many of you might have noticed by now, we have added a new
> Resourcestab under
> developer.android.com. It contains samples, tutorials and technical
> articles. We want your feedback to add more samples and tutorials to
> it.. Please add/vote topics for new samples and tutorials at the link
> here.
> Please be very specific (like mentioning API or package or feature or tool
> names) when you submit a suggestion.
>
> Thanks for your feedback in helping us improve our Android developer
> resources.
>
> -Megha

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: The notepad tutorial

2010-05-05 Thread NeeravA
Ahh my bad .. i post the stack trace and just realized what was
happening in the code.




On May 5, 11:34 pm, NeeravA  wrote:
> The tutorial does not exactly say why it crashes on hitting the back
> button. The crash happens in part2.
>
> the link for part3 is as 
> follows.http://developer.android.com/resources/tutorials/notepad/notepad-ex3
>
> check out step 1.
>
>  i see this stack trace.
> java.lang.RuntimeException: Failure delivering result
> ResultInfo{who=null, request=1, result=0, data=null} to activity
> {com.android.demo.notepad2/com.android.demo.notepad2.Notepadv2}:
> java.lang.NullPointerException
>
> On May 5, 11:43 am, Justin Anderson  wrote:
>
>
>
> > If I remember correctly, doesn't that tutorial have more parts to it that
> > explain why it crashes and the steps needed to fix it?
>
> > --
> > There are only 10 types of people in the world...
> > Those who know binary and those who don't.
> > --
>
> > On Wed, May 5, 2010 at 8:28 AM, TreKing  wrote:
> > > On Tue, May 4, 2010 at 10:24 PM, NeeravA  wrote:
>
> > >> Can someone explain why does it crash on hitting the back button. I mean
> > >> in terms of the lifecycle of the activity.
>
> > > Not without more information. Have you run the tutorial? Does it crash as
> > > it says? What's the stack trace at that point?
>
> > > -
> > > TreKing - Chicago transit tracking app for Android-powered devices
> > >http://sites.google.com/site/rezmobileapps/treking
>
> > >  --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Beginners" group.
>
> > > NEW! Try asking and tagging your question on Stack Overflow at
> > >http://stackoverflow.com/questions/tagged/android
>
> > > To unsubscribe from this group, send email to
> > > android-beginners+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-beginners?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow 
> > athttp://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-beginners?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow 
> athttp://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: The notepad tutorial

2010-05-05 Thread NeeravA
The tutorial does not exactly say why it crashes on hitting the back
button. The crash happens in part2.

the link for part3 is as follows.
http://developer.android.com/resources/tutorials/notepad/notepad-ex3.html

check out step 1.

 i see this stack trace.
java.lang.RuntimeException: Failure delivering result
ResultInfo{who=null, request=1, result=0, data=null} to activity
{com.android.demo.notepad2/com.android.demo.notepad2.Notepadv2}:
java.lang.NullPointerException



On May 5, 11:43 am, Justin Anderson  wrote:
> If I remember correctly, doesn't that tutorial have more parts to it that
> explain why it crashes and the steps needed to fix it?
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
>
> On Wed, May 5, 2010 at 8:28 AM, TreKing  wrote:
> > On Tue, May 4, 2010 at 10:24 PM, NeeravA  wrote:
>
> >> Can someone explain why does it crash on hitting the back button. I mean
> >> in terms of the lifecycle of the activity.
>
> > Not without more information. Have you run the tutorial? Does it crash as
> > it says? What's the stack trace at that point?
>
> > -
> > TreKing - Chicago transit tracking app for Android-powered devices
> >http://sites.google.com/site/rezmobileapps/treking
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow 
> athttp://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Maps Overlay onTap help needed:

2010-05-05 Thread TreKing
On Wed, May 5, 2010 at 8:57 PM, karthik k  wrote:

> I'm unable to implement the methods inside the onTap() so that upon i click
> the androidmarker icon on the map, it tells me some cavvas popout layout
> being  transparent with some text(substantially, even that canvas layout is
> clickable and takes to another activity).
>

A MapView is a ViewGroup like any other -  you can add other views to it at
any point. Unique to MapView are layout params that let you place views
based on map coordinates.

It's a simple matter of defining the layout you want to show, inflating it
on tap, and adding it to the MapView at the correct location.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Advice For First (Simple?) Non-Tutorial Project

2010-05-05 Thread Daniel Favela
Greetings again, fellow beginners!

I looked through status.net and it provoked a question.  I do not need
something too specialized; in fact, I don't really have the server to host
the suggested microblogging service on.  Instead, does Android have the
capability to do something with a public medium instead, as described below?

--- Affecting the Counter ---
1. User makes a selection to add or remove themself to/from the counter.
2. The app posts something to a public medium (example: twitter) account
that indicates an addition or a removal.
3. The app updates its counter according to the user's addition/subtraction.
4. The app looks up the public counter (below).

--- Looking Up the Counter ---
1. The app looks up the "twitter" account.  For simplicity, let us say that
this occurs when a user adds or removes themselves (above).
2. The app reads entries from some date/time to present date/time; entries
contain text that indicate additions/subtractions to the count.
3. The app reads/parses these entries.
4. The app updates its counter according to the entries' values.

What I want to know: is all that possible on the Android?  You don't have to
give me details if you don't feel like it, but any
direction/comments/ideas/pitfalls are welcome.

Thank you for reading, and have a great day!

-Danny



On Sat, May 1, 2010 at 3:42 PM, ubuntuexplorer wrote:

> Dear Mark,
> Thanks for the answer. As I understand, it seems that learning will be
> simpler if I make up an app. idea and then try to learn what is required to
> build it.
>
> I will try to get the books suggested if I need further info.
>
> Regards,
> UE.
>
>
> On Sat, May 1, 2010 at 11:30 PM, Mark Murphy wrote:
>
>> Ubuntu Explorer wrote:
>> > I have more or less the same question. The amount of detail in the API
>> > is overwhelming for me to choose what is really required for my app. Are
>> > there specific areas we can focus on that can help us ramp up quickly.
>>
>> That is impossible to answer in the abstract. A 3D first-person shooter
>> is very different from a PDF viewer, which is very different from a
>> social networking client, which is very different from a tip calculator.
>> The "specific areas [you] can focus on that can help [you] ramp up
>> quickly" will vary by what you are building.
>>
>> At the risk of sounding self-serving, if you find the documentation
>> overwhelming, perhaps you need different documentation:
>>
>> http://wiki.andmob.org/books
>>
>> (in the interests of full disclosure, I wrote some of those)
>>
>> > On Sat, May 1, 2010 at 4:27 PM, Daniel Favela > > First question: I've done the Hello World and notepad tutorials, as
>> > well as run through the quick tutorial
>> > on youtube by Dan
>> > Morril.  I've also read a bit of the Android fundamentals
>> > materials.  Is this enough experience to make an application like
>> > the one I'll describe below?
>> >
>> > If not, what do you think I should read or try next?  If so,
>> >
>> > The application I have in mind will be a counter triggered by
>> > users.  A user will add themselves to the count, remove themselves
>> > from the count, and view the count.
>> >
>> > When a user adds or removes themself to the count...
>> > - if possible, this will update the count on other instances for
>> > other users/devices
>> >
>> > That's my first step for now.  The UI will be a ListView showing the
>> > counts that users have added themselves to (once I create the means
>> > to have one count, I will easily be able to scale the app to have
>> > "n" counts).  There will be a button to add and remove the user.
>> >
>> > Sounds reasonable, right?  Please let me know if this sounds
>> > difficult, especially where the multi-device communication (in
>> > updating the counter) is concerned.  Know of a library that I'll
>> > have to use, or have some general advice for this?  Tell me! :)
>>
>> IMHO, you're looking at your problem backwards.
>>
>> Your application requires a server, from your description. Focus on
>> getting the server right first:
>>
>> -- how are you planning on sending data to the server? (HTTP via a
>> REST-style API? XMPP? SMTP? something else?)
>>
>> -- where and how are you storing your counts? (SQLite? MySQL? Oracle?
>> Flat file? memcached? Redis? something else?)
>>
>> -- how are you determining who sees what count? (everybody sees
>> everybody's? something else?)
>>
>> -- how are you planning on distributing updates from the server?
>> (polling by the clients? WebSockets with Comet? SMS? something else?)
>>
>> -- what data format will you be using for all of this? (XML? JSON? YAML?
>> binary payloads via Protocol Buffers? binary payloads via Thrift?
>> something else?)
>>
>> The only part of Android that really comes into play when thinking about
>> your server are the communication protocols and payloads to/from the
>> ser

[android-beginners] Maps Overlay onTap help needed:

2010-05-05 Thread karthik k
 have ben stuck with a problem.
It is about a markers on the overlay on a map and the ontap method.
I'm unable to implement the methods inside the onTap() so that upon i
click the androidmarker icon on the map, it tells me some cavvas
popout layout being  transparent with some text(substantially, even
that canvas layout is clickable and takes to another activity).
i have copy pasted the code below:

I hope to find some solution from you.
Thanks in advance

I'm using the sample program given in the Google Android Website
http://developer.android.com/resources/tutorials/views/hello-mapview.html
and i want to extended it to the next level.

Urgent help needed. Thanks in advance..

Let me know if more infomration is requirred

//HelloGoogleMaps.java

import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;

public class HelloGoogleMaps extends MapActivity {
MapController mapController;

   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);
   MapView mapView = (MapView) findViewById(R.id.mapview);
   mapView.setBuiltInZoomControls(true);
   mapController = mapView.getController();
   mapController.setZoom(2);
   List mapOverlays = mapView.getOverlays();
   Drawable drawable =
this.getResources().getDrawable(R.drawable.androidmarker);
   HelloItemizedOverlay itemizedoverlay = new
HelloItemizedOverlay(drawable,this);

   GeoPoint point = new GeoPoint(45005000,-93228900);
   OverlayItem overlayitem = new OverlayItem(point, "Hola,
Mundo!", "I'm in Mexico City!");
   GeoPoint point2 = new GeoPoint(3541, 13946);
   OverlayItem overlayitem2 = new OverlayItem(point2, "wow",
"this is tokyo");
   itemizedoverlay.addOverlay(overlayitem);
   itemizedoverlay.addOverlay(overlayitem2);

   mapOverlays.add(itemizedoverlay);
   }

   @Override
   protected boolean isRouteDisplayed() {
   return false;
   }
}


// HelloItemizedOverlay.java

import java.util.ArrayList;

import android.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.Toast;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class HelloItemizedOverlay extends ItemizedOverlay {
private ArrayList mOverlays = new
ArrayList();
Context mContext ;

public HelloItemizedOverlay(Drawable defaultMarker) {
 super(boundCenterBottom(defaultMarker));

 // TODO Auto-generated constructor stub
}

public HelloItemizedOverlay(Drawable defaultMarker, Context
context) {
   super(boundCenterBottom(defaultMarker));
   mContext = context;
}

@Override
protected boolean onTap(int index) {
  OverlayItem item = mOverlays.get(index);
  /*// working below code, just replace */
AlertDialog.Builder dialog = new
AlertDialog.Builder(mContext);
  dialog.setTitle(item.getTitle());
  dialog.setMessage(item.getSnippet());
  dialog.show();

  // I need to show another dialog opening up on tapping the
above dialog. Need help here:



  return true;
}

@Override
public int size() {
  return mOverlays.size();
}

@Override
protected OverlayItem createItem(int i) {
  return mOverlays.get(i);
}

public void addOverlay(OverlayItem overlay) {
mOverlays.add(overlay);
populate();
}


}

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Problem with imported Project

2010-05-05 Thread Kevin Brooks
I am receiving the following error at the Project level for a project 
that I imported from another developer.


DescriptionResourcePathLocationType
Conversion to Dalvik format failed with error 1laInformacion
UnknownAndroid Packaging Problem


I am using Ganymede Eclipse on a Windows Vista Home Edition.  My SDK 
Version is 0.9.6v201002051504-24846.


Can anyone tell me how to fix this one?

Kevin

--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] ubuntu 10.04 emulator not launching

2010-05-05 Thread David Turner
can you start the emulator from the command line properly (e.g. :
$ANDROID_SDK_ROOT/tools/emulator -avd )

Can you try with the -verbose option to see if it dumps useful information,
there is also -debug-all which is going to dump a *lot* of stuff.

It looks like the emulator has problems connecting to your X server. How is
your DISPLAY environment variable defined ?

On Mon, May 3, 2010 at 12:30 AM, riazrahaman  wrote:

> Hi,
>
> Was not able to launch the emulator on Ubuntu 10.04. Getting the below
> error in eclipse. Is there a work around or a fix for this?
>
> [2010-05-02 23:35:34 - HelloWorld] Automatic Target Mode: Unable to detect
> device compatibility. Please select a target device.
> [2010-05-02 23:35:39 - HelloWorld] Launching a new emulator with Virtual
> Device 'android15'
> [2010-05-02 23:35:42 - HelloWorld] New emulator found: emulator-5554
> [2010-05-02 23:35:42 - HelloWorld] Waiting for HOME
> ('android.process.acore') to be launched...
> [2010-05-02 23:35:43 - Emulator] XIO:  fatal IO error 11 (Resource
> temporarily unavailable) on X server ":0.0"
> [2010-05-02 23:35:43 - Emulator]   after 7 requests (6 known processed)
> with 0 events remaining.
> [2010-05-02 23:35:43 - HelloWorld] emulator-5554 disconnected! Cancelling
> 'com.paad.chapter2.HelloWorld activity launch'!
>
> Is this a known issue with the 10.04 Lucid lynx ubuntu?
>
>
> Regards,
> Riaz Ur Rahaman
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Change button position

2010-05-05 Thread Victor Hugo
Hi,

I have a button and i want change the x and y position on screen
programmatically

how do i it?

hugs

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Question on finishOnTaskLaunch

2010-05-05 Thread Ubuntu Explorer
Hi,
I read the following text in App. Fundamentals today.

This attribute is like clearTaskOnLaunch, but it operates on a single
activity, not an entire task. And it can cause any activity to go away,
including the root activity. When it's set to "true", the activity remains
part of the task only for the current session. If the user leaves and then
returns to the task, it no longer is present.

Does this mean, all activities with this flag set, will do away when the
user moves out of and then back in to the task. Doesn't this leave the task
with a different set of activities? For ex, before leaving task has A-B-C-D,
where B and D are set to clearTaskOnLaunch. After moving out of task, user
comes back to task. He will see - A-C. Am I right ?

Is there a use case for this behaviour?

Regards,
UE.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: set clip in canvas

2010-05-05 Thread jasont
Canvas has several clipRect methods,
http://developer.android.com/intl/fr/reference/android/graphics/Canvas.html#clipRect%28float,%20float,%20float,%20float,%20android.graphics.Region.Op%29

Here is a more through explanation since you mentioned J2ME:
http://jtomlinson.blogspot.com/2008/10/clipping.html The main key is
passing in Region.Op.REPLACE


On May 5, 8:36 am, pti4ik  wrote:
> Hello everybody! Can anyone tell me if there is a way to set a clip in
> my Canvas to the specific rectangle, equivalent to setClip(x, y,
> width, height) from class Graphics in J2ME?
> I found only the ways to intersect my clip with a rectangle or region,
> but not to move it to the specific position and size.
>
> Best regards, Andrew
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow 
> athttp://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Human interface guidelines. Equivalent to iPhone sectioned table

2010-05-05 Thread Kostya Vasilyev

The Android Dev Guide does exist:

http://developer.android.com/guide/practices/ui_guidelines/index.html

It covers in detail how application is supposed to guide the user from one  
activity to another.


However, it does not specifically cover your question.

Perhaps you could use a list view, make it look like Android's built-in  
preference screens, with two-line items, each containing the name of  
action to be taken and its description in smaller text below.


By adding nice graphics in the top portion of the view, and using a theme  
to set colors to something nice (other than the default white-on-black), I  
think can be made look quite good.


-- Kostya

Danny Pimienta  писал(а) в своём письме Wed, 05 May  
2010 21:54:40 +0400:



I would be interested in a answer to this as well.

On May 5, 2010 12:20 PM, "david2"  wrote:

Hello,
Does Google or anyone publish UI guidelines for Android?

In particular, when moving an app from the iPhone to Android, are
there any conventions for equivalent UI controls or suggested UI
design?

On the iPhone, the sectioned table view is used to provide multiple
choices for paths to follow through an application.

What is the suggested equivalent on Android? Do any UI guidelines
exist? I'm trying to come up with something that looks nice. The
iPhone version has an image background surrounding the table.

Some options I can think of include:
- A series of buttons: Not sure if this will look cheesy.
- A list view: Typically consumes the whole window. Doesn't look as
nice as the iPhone version.
- A list view inset in a window: I've done this before. Looks ok.
Corners are not rounded like they are on the iPhone. Can do a
background.

Any suggestions?

--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en




--
Kostya Vasilyev - WiFi Manager + pretty widget -  
http://kmansoft.wordpress.com/sw


--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Human interface guidelines. Equivalent to iPhone sectioned table

2010-05-05 Thread Danny Pimienta
I would be interested in a answer to this as well.

On May 5, 2010 12:20 PM, "david2"  wrote:

Hello,
Does Google or anyone publish UI guidelines for Android?

In particular, when moving an app from the iPhone to Android, are
there any conventions for equivalent UI controls or suggested UI
design?

On the iPhone, the sectioned table view is used to provide multiple
choices for paths to follow through an application.

What is the suggested equivalent on Android? Do any UI guidelines
exist? I'm trying to come up with something that looks nice. The
iPhone version has an image background surrounding the table.

Some options I can think of include:
- A series of buttons: Not sure if this will look cheesy.
- A list view: Typically consumes the whole window. Doesn't look as
nice as the iPhone version.
- A list view inset in a window: I've done this before. Looks ok.
Corners are not rounded like they are on the iPhone. Can do a
background.

Any suggestions?

--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Error trying to update SDK

2010-05-05 Thread Xavier Ducrohet
On Tue, May 4, 2010 at 9:21 PM, Kaustubh Padegaonkar
 wrote:
> Yeah, try changing the https to http. Will work.
> Kaustubh Padegaonkar,
> thetuxra...@gmail.com


No it won't! The error is not about downloading the file but about
validating the XML *once it's downloaded*.

Xav
-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Human interface guidelines. Equivalent to iPhone sectioned table

2010-05-05 Thread david2
Hello,
Does Google or anyone publish UI guidelines for Android?

In particular, when moving an app from the iPhone to Android, are
there any conventions for equivalent UI controls or suggested UI
design?

On the iPhone, the sectioned table view is used to provide multiple
choices for paths to follow through an application.

What is the suggested equivalent on Android? Do any UI guidelines
exist? I'm trying to come up with something that looks nice. The
iPhone version has an image background surrounding the table.

Some options I can think of include:
- A series of buttons: Not sure if this will look cheesy.
- A list view: Typically consumes the whole window. Doesn't look as
nice as the iPhone version.
- A list view inset in a window: I've done this before. Looks ok.
Corners are not rounded like they are on the iPhone. Can do a
background.

Any suggestions?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] EditText Image changing look when given at runtime.

2010-05-05 Thread Alok Kulkarni
Hi guys,
I am having an EditText. If i specify image for the EditText in the layout
XML file (android:background) it looks different and looks different when i
specify it at runtime
EditText et = (EditText)findViewById(R.drawable.et1);
et.setBackgroundDrawable(Main.themes.getDrawable(EDRAWABLES.EditTextBackgroundImage));
Both codes point to the same image. When i specify the image at runtime ,
the EditText leaves a margin at the top and bottom of the cursor in the
edittext which does not happen when i do it in XML.
I have attached the screenshots of both images. Top image is the one drawn
from XML and bottom one is given at runtime.
I am not getting the difference ?
Actually i am facing similar problems with other Widgets too if i change the
logic of specifying the drawable at runtime and not at compile time..
Is this the default SDK behaviour ?
Thanks,
Alok

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
<>

Re: [android-beginners] The notepad tutorial

2010-05-05 Thread Justin Anderson
If I remember correctly, doesn't that tutorial have more parts to it that
explain why it crashes and the steps needed to fix it?

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Wed, May 5, 2010 at 8:28 AM, TreKing  wrote:

> On Tue, May 4, 2010 at 10:24 PM, NeeravA  wrote:
>
>> Can someone explain why does it crash on hitting the back button. I mean
>> in terms of the lifecycle of the activity.
>>
>
> Not without more information. Have you run the tutorial? Does it crash as
> it says? What's the stack trace at that point?
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] The notepad tutorial

2010-05-05 Thread TreKing
On Tue, May 4, 2010 at 10:24 PM, NeeravA  wrote:

> Can someone explain why does it crash on hitting the back button. I mean in
> terms of the lifecycle of the activity.
>

Not without more information. Have you run the tutorial? Does it crash as it
says? What's the stack trace at that point?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] set clip in canvas

2010-05-05 Thread pti4ik
Hello everybody! Can anyone tell me if there is a way to set a clip in
my Canvas to the specific rectangle, equivalent to setClip(x, y,
width, height) from class Graphics in J2ME?
I found only the ways to intersect my clip with a rectangle or region,
but not to move it to the specific position and size.

Best regards, Andrew

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Adding an HTML content to a webview without space

2010-05-05 Thread And-Rider
I am trying to add an HTML content to a web view. If the words in the
HTML content are without spaces then webview keeps that particular
word on the same line.I want that content to be wrapped and be on the
next line.Is it possible to do that.I am attaching a sample code that
can reproduce the issue.


String
temp="WebViewallowsyoutocreateyourownwindowforviewingwebpages(orevendevelopacompletebrowser).Inthistutorial,youcreateasimpleActivitythatcanviewandnavigatewebpages.
1.CreateanewprojectnamedHelloWebView.";
 WebView wb=new WebView(this);
 wb.loadDataWithBaseURL("", temp, "text/html",
Encoding.UTF_8.toString(),"");
 setContentView(wb);

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Alok Kulkarni
Hi ,
I am having the following code for drawing buttons in my project.
I am having a button which has three images for 1 button .Namely one image
for the rectangle and 2 images for the left and right side curves
respectively.
When the button has focus , there is another three images for focus and
similarly 3 images when button is pressed.
Following is the code.

public void setButtonStyle(Button btn) {

//The middle rectangle
StateListDrawable drawables = new StateListDrawable();
drawables.addState(new int[] { stateFocused, -statePressed },
dButtonMidOverImage);
drawables.addState(new int[] { stateFocused, statePressed },
dButtonMidDownImage);
drawables.addState(new int[] { -stateFocused, statePressed },
dButtonMidDownImage);
drawables.addState(new int[] { -stateChecked }, dButtonMidUpImage);

btn.setBackgroundDrawable(drawables);

//The left curve
StateListDrawable drawablesLeft = new StateListDrawable();
drawablesLeft.addState(new int[] { stateFocused, -statePressed },
dButtonLeftOverImage);
drawablesLeft.addState(new int[] { stateFocused, statePressed },
dButtonLeftDownImage);
drawablesLeft.addState(new int[] { -stateFocused, statePressed },
dButtonLeftDownImage);
drawablesLeft.addState(new int[] { -stateChecked },
dButtonLeftUpImage);

StateListDrawable drawablesRight = new StateListDrawable();
drawablesRight.addState(new int[] { stateFocused, -statePressed },
dButtonRightOverImage);

//The right curve
drawablesRight.addState(new int[] { stateFocused, statePressed },
dButtonRightDownImage);
drawablesRight.addState(new int[] { -stateFocused, statePressed },
dButtonRightDownImage);
drawablesRight.addState(new int[] { -stateChecked },
dButtonRightUpImage);

//Compound drawables set for left and right side.
btn.setCompoundDrawablesWithIntrinsicBounds(drawablesLeft, null,
drawablesRight, null);


}
This thing which i have done runtime can be done in the XML too , but i want
to change themes runtime so my images for button will also change runtime.
If i do the code in the XML it works fine on both Android 1.5 as well as
Android 1.6 .But doing it in code distorts the images for 1.6 emulator.
I have attached the screen shot of the buttons on both 1.5 and 1.6
emulators.As you can see, the left and right curve images come almost to the
center and the centre image is expanded in 1.6 emulator. The same problem is
seen on HTC Desire (Android2.1)
Is there something wrong that i am doing . Is there any workaround for this
problem.
Thanks ,
Alok.,

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
<><><>