[android-developers] Re: "Button" in Android and also Apple ..that no one uses... as it should be. maybe the most important one...

2016-09-01 Thread michael Hoehne


Am Donnerstag, 1. September 2016 18:09:38 UTC+2 schrieb michael Hoehne:
>
> Does anybody knew that there is 1 button which seems nearly  dead 
> exists in Android software also in apple ... but  it is nearly unused 
> .t should have  more potencial than google has.. sounds ... no i am really 
> not shizophrenic etc  ..no. 
> I do know what i am talking about . I would like to talk to Larry Page 
> personally. please, possible? Please answer.
>

to be honest i dont know how to programm apps
I guess it is maybe the most important market for Android.

I dont know about Android much neither Apple.

But I know the biggest market is not being touched  -  still not...

Sometimes ... the simplest things can 
surprise you.
Mr.  Page "with all my human respect for all you have created."
Michael 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/0ea94cdd-4a54-47fa-9f1d-3a4332c530d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Button

2013-02-26 Thread skink


Arun Kumar K wrote:
> Hi guys,
>
> I want to add a button in App Uninstall page..how can i add the button
> can any one help me..
>
>

you can't do it

pskink

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




[android-developers] Re: Button#onClickListener thread unsafe?

2012-10-17 Thread Piren
It depends on how android treats onClick events.
According to the behavior seen in his example it seems like that android 
doesn't check whether a view is disabled before running onClick rather 
before queuing it.

So if you manage to dispatch two onClick events to a view before the first 
one was processed (and disabling itself), both will sit in the queue and 
both will be run.



On Tuesday, October 16, 2012 4:30:22 PM UTC+2, Greenhand wrote:
>
> I think I am confused.
> If the entire Android UI is completely thread safe and the events are 
> queued, the event should be processed one by one. I would like to know why 
> an inconsistent state can be seen during the execution even if I do not 
> start a new thread in my code.
>
> G. Blake Meike於 2012年10月15日星期一UTC+8下午8時05分39秒寫道:
>
>> Lew is exactly correct.  The entire Android UI is completely thread safe, 
>> because it runs on a single thread.  During execution of your program, you 
>> may, from within the code, be able to see a state that is inconsistent. 
>>  That is only because you are observing that state from a partially 
>> processed event.  Each new even will observe consistent state.
>>
>> ... but the main point is that you don't need to worry: unless you 
>> explicitly start a new thread, looper or asynctask, everything in the UI is 
>> on a single thread.  It is safe.
>>
>> G. Blake Meike
>> Marakana
>>
>> The second edition of Programming Android is now on-line:
>> http://shop.oreilly.com/product/0636920023005.do
>>
>

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

[android-developers] Re: Button#onClickListener thread unsafe?

2012-10-16 Thread Greenhand
I think I am confused.
If the entire Android UI is completely thread safe and the events are 
queued, the event should be processed one by one. I would like to know why 
an inconsistent state can be seen during the execution even if I do not 
start a new thread in my code.

G. Blake Meike於 2012年10月15日星期一UTC+8下午8時05分39秒寫道:

> Lew is exactly correct.  The entire Android UI is completely thread safe, 
> because it runs on a single thread.  During execution of your program, you 
> may, from within the code, be able to see a state that is inconsistent. 
>  That is only because you are observing that state from a partially 
> processed event.  Each new even will observe consistent state.
>
> ... but the main point is that you don't need to worry: unless you 
> explicitly start a new thread, looper or asynctask, everything in the UI is 
> on a single thread.  It is safe.
>
> G. Blake Meike
> Marakana
>
> The second edition of Programming Android is now on-line:
> http://shop.oreilly.com/product/0636920023005.do
>

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

[android-developers] Re: Button#onClickListener thread unsafe?

2012-10-15 Thread G. Blake Meike
Lew is exactly correct.  The entire Android UI is completely thread safe, 
because it runs on a single thread.  During execution of your program, you 
may, from within the code, be able to see a state that is inconsistent. 
 That is only because you are observing that state from a partially 
processed event.  Each new even will observe consistent state.

... but the main point is that you don't need to worry: unless you 
explicitly start a new thread, looper or asynctask, everything in the UI is 
on a single thread.  It is safe.

G. Blake Meike
Marakana

The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do

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

[android-developers] Re: Button#onClickListener thread unsafe?

2012-10-14 Thread Jonathan S
Any class use View is not thread safe.

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

[android-developers] Re: button click event listener

2012-04-09 Thread Vivek Punjabi
Thanks for d reply.
But now my problem is solved.
Actually i wanted the player to click button and then the game should
proceed until it waits for the same player to click button again. But
now got the structure. My fault.

On Apr 5, 7:42 pm, Justin Anderson  wrote:
> > oncreate()
> > {
> > function1( );
> > //wait for onclick event
> > function2( );  //After some calculation, calls function1( )
> > }
>
> That won't work... The UI will not show up until after onCreate() and
> onResume() are called.  Why are you explicitly waiting for a click event?
> What are you doing to do that, an infinite loop or something?
>
> Can u suggest me the structure of my game as I am a newbie in Android> 
> programming?
>
> Seems like you need to read up on the Android Activity 
> lifecycle:http://developer.android.com/guide/topics/fundamentals/activities.htm...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> On Thu, Apr 5, 2012 at 2:58 AM, Vivek Punjabi wrote:
>
>
>
>
>
>
>
> > oncreate()
> > {
> > function1( );
> > //wait for onclick event
> > function2( );  //After some calculation, calls function1( )
> > }

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


Re: [android-developers] Re : Button onclick

2012-03-21 Thread Narendra Singh Rathore
On Tue, Mar 20, 2012 at 2:24 PM, vivek elangovan
wrote:


>  on clicking the button then only i need to display input field
> otherwise i have to hide fields and have to fill data
>
>
>
Why don't you set initial visibility of the fields to be "INVISIBLE" and on
Button click, set them to "VISIBLE".

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

[android-developers] Re : Button onclick

2012-03-20 Thread vivek elangovan
Hi members,
In my application i need fill input data when i click 
some button.So on clicking the button then only i need to display input 
field  otherwise i have to hide fields and have to fill data

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

[android-developers] Re: Button animation

2012-03-13 Thread Tytanit
Thanks, it works :) I have another question - is there any way to define a 
few buttons as a 1 group, and make 1 animation that will start for this 
group, instead of making an separate animation start for each of them?

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

[android-developers] Re: Button for dynamic text

2012-02-23 Thread Pram
Thanks for the reply,, my log ineclipse is showing the else statement
of that number is not recognized.
I need to work on my if statement, and to display the responding if
statement or else statement on screen.

On Feb 22, 9:25 pm, Pavel Dudka  wrote:
> Really funny, but anyways...
>
> 1) You cannot do  " if (PleaseEnter.equals("1")) "
> If you want to get String which was entered by user - you need to use
> PleaseEnter.getText() method, so your if statement would probably look
> like:
> if(PleaseEnter.getText().equals("1"))
> {
>    tv.setText("This is the display 1");
>
> }
>
> 2) As I understand, you are experiencing problems when trying to
> return something from onClick() - don't do that :) You don't need it -
> believe me :)
>
> On Feb 22, 5:10 pm, Pram  wrote:
>
>
>
>
>
>
>
> > The code is below I have taken out some of the commented parts that
> > were above.
> > public class GenNameActivity extends Activity {
> >         EditText PleaseEnter;
>
> >     /** Called when the activity is first created. */
> >     @Override
> >     protected void onCreate(Bundle savedInstanceState) {
>
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.main);
> >       Button button = (Button)findViewById(R.id.go);
> >       button.setOnClickListener(mAddListener);
> >     }
>
> >     private OnClickListener mAddListener = new OnClickListener()
> >     {
> >         public void onClick(View v)
> >         {
>
> > Toast.makeText(Num.this,stringFunction(),Toast.LENGTH_SHORT).show();
> >  }
> >         Public string stringFunction();
> >         {
> >    {
> >       PleaseEnter=(EditText)findViewById(R.id.PleaseEnter);
>
> >       {
> >       }
>
> >       if (PleaseEnter.equals("1")) {
> >           //tv.setText("This is the display 1.");
> >           return "9";
> >       } else if  (PleaseEnter.equals("2")){
> >         //return;
>
> > On Feb 22, 7:37 pm, "Tommy Hartz"  wrote:
>
> > > Copy and paste the code so I can see exactly what you have.
>
> > > -Original Message-
> > > From: android-developers@googlegroups.com
>
> > > [mailto:android-developers@googlegroups.com] On Behalf Of Pram
> > > Sent: Wednesday, February 22, 2012 5:47 PM
> > > To: Android Developers
> > > Subject: [android-developers] Re: Button for dynamic text
>
> > > At publicstring stringFunction(){
> > > I am getting syntax error need ; to complete Field Decleration.
>
> > > On Feb 22, 3:39 pm, "Tommy Hartz"  wrote:
> > > > Why not connect the button click event to a function EX
>
> > > > public void onClick(View v) {
>
> > > > Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();
>
> > > > }
>
> > > > Public string stringFunction(){
>
> > > > If(whatever){
>
> > > > Return = "Hello";
>
> > > > }
> > > > }
>
> > > > From: android-developers@googlegroups.com
> > > > [mailto:android-developers@googlegroups.com] On Behalf Of TreKing
> > > > Sent: Wednesday, February 22, 2012 3:22 PM
> > > > To: android-developers@googlegroups.com
> > > > Subject: Re: [android-developers] Re: Button for dynamic text
>
> > > > On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:
>
> > > > when I try to use return in my if statement that does not work the tv
> > > > statements do not show anything on the screen when it is executed.
>
> > > > The code in your original post is extremely hard to read. Try a
> > > > smaller snippet that illustrates what you're talking about.
>
> > > > Have you put in logging and used your debugger to step through and see
> > > > what the code is doing?
>
> > > > --
> > > > --
> > > > -
> > > > TreKing <http://sites.google.com/site/rezmobileapps/treking>  -
> > > > Chicago transit tracking app for Android-powered devices
>
> > > > --
> > > > 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, 

[android-developers] Re: Button for dynamic text

2012-02-23 Thread Pavel Dudka
Really funny, but anyways...

1) You cannot do  " if (PleaseEnter.equals("1")) "
If you want to get String which was entered by user - you need to use
PleaseEnter.getText() method, so your if statement would probably look
like:
if(PleaseEnter.getText().equals("1"))
{
   tv.setText("This is the display 1");
}

2) As I understand, you are experiencing problems when trying to
return something from onClick() - don't do that :) You don't need it -
believe me :)

On Feb 22, 5:10 pm, Pram  wrote:
> The code is below I have taken out some of the commented parts that
> were above.
> public class GenNameActivity extends Activity {
>         EditText PleaseEnter;
>
>     /** Called when the activity is first created. */
>     @Override
>     protected void onCreate(Bundle savedInstanceState) {
>
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>       Button button = (Button)findViewById(R.id.go);
>       button.setOnClickListener(mAddListener);
>     }
>
>     private OnClickListener mAddListener = new OnClickListener()
>     {
>         public void onClick(View v)
>         {
>
> Toast.makeText(Num.this,stringFunction(),Toast.LENGTH_SHORT).show();
>  }
>         Public string stringFunction();
>         {
>    {
>       PleaseEnter=(EditText)findViewById(R.id.PleaseEnter);
>
>       {
>       }
>
>       if (PleaseEnter.equals("1")) {
>           //tv.setText("This is the display 1.");
>           return "9";
>       } else if  (PleaseEnter.equals("2")){
>         //return;
>
> On Feb 22, 7:37 pm, "Tommy Hartz"  wrote:
>
>
>
> > Copy and paste the code so I can see exactly what you have.
>
> > -----Original Message-
> > From: android-developers@googlegroups.com
>
> > [mailto:android-developers@googlegroups.com] On Behalf Of Pram
> > Sent: Wednesday, February 22, 2012 5:47 PM
> > To: Android Developers
> > Subject: [android-developers] Re: Button for dynamic text
>
> > At publicstring stringFunction(){
> > I am getting syntax error need ; to complete Field Decleration.
>
> > On Feb 22, 3:39 pm, "Tommy Hartz"  wrote:
> > > Why not connect the button click event to a function EX
>
> > > public void onClick(View v) {
>
> > > Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();
>
> > > }
>
> > > Public string stringFunction(){
>
> > > If(whatever){
>
> > > Return = "Hello";
>
> > > }
> > > }
>
> > > From: android-developers@googlegroups.com
> > > [mailto:android-developers@googlegroups.com] On Behalf Of TreKing
> > > Sent: Wednesday, February 22, 2012 3:22 PM
> > > To: android-developers@googlegroups.com
> > > Subject: Re: [android-developers] Re: Button for dynamic text
>
> > > On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:
>
> > > when I try to use return in my if statement that does not work the tv
> > > statements do not show anything on the screen when it is executed.
>
> > > The code in your original post is extremely hard to read. Try a
> > > smaller snippet that illustrates what you're talking about.
>
> > > Have you put in logging and used your debugger to step through and see
> > > what the code is doing?
>
> > > --
> > > --
> > > -
> > > TreKing <http://sites.google.com/site/rezmobileapps/treking>  -
> > > Chicago transit tracking app for Android-powered devices
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> > > android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group
> > > athttp://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Button for dynamic text

2012-02-22 Thread Pram
The code is below I have taken out some of the commented parts that
were above.
public class GenNameActivity extends Activity {
EditText PleaseEnter;

/** Called when the activity is first created. */
@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
  Button button = (Button)findViewById(R.id.go);
  button.setOnClickListener(mAddListener);
}

private OnClickListener mAddListener = new OnClickListener()
{
public void onClick(View v)
{
 
Toast.makeText(Num.this,stringFunction(),Toast.LENGTH_SHORT).show();
 }
Public string stringFunction();
{
   {
  PleaseEnter=(EditText)findViewById(R.id.PleaseEnter);

  {
  }

  if (PleaseEnter.equals("1")) {
  //tv.setText("This is the display 1.");
  return "9";
  } else if  (PleaseEnter.equals("2")){
//return;

On Feb 22, 7:37 pm, "Tommy Hartz"  wrote:
> Copy and paste the code so I can see exactly what you have.
>
>
>
>
>
>
>
> -Original Message-
> From: android-developers@googlegroups.com
>
> [mailto:android-developers@googlegroups.com] On Behalf Of Pram
> Sent: Wednesday, February 22, 2012 5:47 PM
> To: Android Developers
> Subject: [android-developers] Re: Button for dynamic text
>
> At publicstring stringFunction(){
> I am getting syntax error need ; to complete Field Decleration.
>
> On Feb 22, 3:39 pm, "Tommy Hartz"  wrote:
> > Why not connect the button click event to a function EX
>
> > public void onClick(View v) {
>
> > Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();
>
> > }
>
> > Public string stringFunction(){
>
> > If(whatever){
>
> > Return = "Hello";
>
> > }
> > }
>
> > From: android-developers@googlegroups.com
> > [mailto:android-developers@googlegroups.com] On Behalf Of TreKing
> > Sent: Wednesday, February 22, 2012 3:22 PM
> > To: android-developers@googlegroups.com
> > Subject: Re: [android-developers] Re: Button for dynamic text
>
> > On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:
>
> > when I try to use return in my if statement that does not work the tv
> > statements do not show anything on the screen when it is executed.
>
> > The code in your original post is extremely hard to read. Try a
> > smaller snippet that illustrates what you're talking about.
>
> > Have you put in logging and used your debugger to step through and see
> > what the code is doing?
>
> > --
> > --
> > -
> > TreKing <http://sites.google.com/site/rezmobileapps/treking>  -
> > Chicago transit tracking app for Android-powered devices
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to
> > android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


RE: [android-developers] Re: Button for dynamic text

2012-02-22 Thread Tommy Hartz
Copy and paste the code so I can see exactly what you have.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of Pram
Sent: Wednesday, February 22, 2012 5:47 PM
To: Android Developers
Subject: [android-developers] Re: Button for dynamic text

At publicstring stringFunction(){
I am getting syntax error need ; to complete Field Decleration.

On Feb 22, 3:39 pm, "Tommy Hartz"  wrote:
> Why not connect the button click event to a function EX
>
> public void onClick(View v) {
>
> Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();
>
> }
>
> Public string stringFunction(){
>
> If(whatever){
>
> Return = "Hello";
>
> }
> }
>
> From: android-developers@googlegroups.com
> [mailto:android-developers@googlegroups.com] On Behalf Of TreKing
> Sent: Wednesday, February 22, 2012 3:22 PM
> To: android-developers@googlegroups.com
> Subject: Re: [android-developers] Re: Button for dynamic text
>
> On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:
>
> when I try to use return in my if statement that does not work the tv 
> statements do not show anything on the screen when it is executed.
>
> The code in your original post is extremely hard to read. Try a 
> smaller snippet that illustrates what you're talking about.
>
> Have you put in logging and used your debugger to step through and see 
> what the code is doing?
>
> --
> --
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking>  - 
> Chicago transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google 
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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

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


Re: [android-developers] Re: Button for dynamic text

2012-02-22 Thread TreKing
On Wed, Feb 22, 2012 at 2:39 PM, Tommy Hartz  wrote:

> Why not connect the button click event to a function EX
>
> public void onClick(View v) {
>
> Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();
>
> }
>
> Public string stringFunction(){
>
> If(whatever){
>
> Return = “Hello”;
>
> }
>
> }
>
On Wed, Feb 22, 2012 at 4:46 PM, Pram  wrote:

> At publicstring stringFunction(){
> I am getting syntax error need ; to complete Field Decleration.
>

I'm sorry, but you both need to learn Java.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Button for dynamic text

2012-02-22 Thread Pram
At publicstring stringFunction(){
I am getting syntax error need ; to complete Field Decleration.

On Feb 22, 3:39 pm, "Tommy Hartz"  wrote:
> Why not connect the button click event to a function EX
>
> public void onClick(View v) {
>
> Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();
>
> }
>
> Public string stringFunction(){
>
> If(whatever){
>
> Return = "Hello";
>
> }
> }
>
> From: android-developers@googlegroups.com
> [mailto:android-developers@googlegroups.com] On Behalf Of TreKing
> Sent: Wednesday, February 22, 2012 3:22 PM
> To: android-developers@googlegroups.com
> Subject: Re: [android-developers] Re: Button for dynamic text
>
> On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:
>
> when I try to use return in my if statement that does not work the tv
> statements do not show anything on the screen when it is executed.
>
> The code in your original post is extremely hard to read. Try a smaller
> snippet that illustrates what you're talking about.
>
> Have you put in logging and used your debugger to step through and see what
> the code is doing?
>
> 
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking>  - Chicago
> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


RE: [android-developers] Re: Button for dynamic text

2012-02-22 Thread Tommy Hartz
Why not connect the button click event to a function EX

 

public void onClick(View v) {

Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();

}

 

Public string stringFunction(){

If(whatever){

Return = "Hello";

}

 

 

}

 

 

From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of TreKing
Sent: Wednesday, February 22, 2012 3:22 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Re: Button for dynamic text

 

On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:

when I try to use return in my if statement that does not work the tv
statements do not show anything on the screen when it is executed.


The code in your original post is extremely hard to read. Try a smaller
snippet that illustrates what you're talking about.

 

Have you put in logging and used your debugger to step through and see what
the code is doing?


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

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

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

Re: [android-developers] Re: Button for dynamic text

2012-02-22 Thread TreKing
On Wed, Feb 22, 2012 at 2:13 PM, Pram  wrote:

> when I try to use return in my if statement that does not work the tv
> statements do not show anything on the screen when it is executed.
>

The code in your original post is extremely hard to read. Try a smaller
snippet that illustrates what you're talking about.

Have you put in logging and used your debugger to step through and see what
the code is doing?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Button for dynamic text

2012-02-22 Thread Pram
Well I know some java, but this seems to be the problem
public void onClick(View v) {
when I try to use return in my if statement that does not work
the tv statements do not show anything on the screen when it is
executed.
A suggestion I got was to use the code below, but I am not sure where
to put the first private void, or what to take out of my code.
You can define your own method at Activity level, such as:

private void onTextEdited(String content) {
// deal with the String
}

In the onClick method of your OnClickListener, you can call it such
as:

public void onClick(View v) {
EditText myEditText = (EditText) findViewById(R.id.PleaseEnter);
onTextEdited(myEditText.getText().toString());
}



On Feb 22, 2:54 pm, TreKing  wrote:
> On Wed, Feb 22, 2012 at 1:45 PM, Pram  wrote:
> > My problem is that the button line has public void ... after this I am
> > trying to use if statements and return methods, but because of the public
> > void, the return method can not return anything. I tried to close the
> > public void, but I am getting errors.
>
> How well do you know Java? It sounds like you're getting hung up over
> language syntax and semantics. If that's the case, you need to brush up on
> Java, which is off-topic for this list.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Button textAppearance Problem.Someone Help me!!

2012-02-16 Thread Uniser
Check your style
style="@style/SimpleBlackShadow"

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


[android-developers] Re: Button enabled issue

2012-02-11 Thread skink


Raju Gaddam wrote:
> Hi iam disable button in xml .how to enable button from my activity class
>
>
> in XMl i write like this   android:visibility="invisible"
> in my activity button.setEnabled(true);
>
> But button is not visible please any one help me


setEnabled controls "enabled" attribute not "visibility"

pskink

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


Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread Raghav Sood
I was a button. I think the problem happened because I changed from a
LinearLayout to a RelativeLayout, and moved the widgets around a bit, as
well as adding a couple of new ones. R.java must not have regenerated
properly and the reset id may have been associated with a TextView
accidentally.

Thanks

On Sun, Jan 8, 2012 at 5:20 PM, skink  wrote:

>
>
> Raghav Sood wrote:
> > It shows button.
> >
> > Anyways, doing a clean build appears to have solved it.
> >
> > Thanks for the help.
> >
>
> Ok, but if you had class cast exception it must have been TextView
> which you were trying to cast to a Button and this cast was makinkg
> class cast ex
>
> pakink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Raghav Sood
http://www.androidactivist.org/ - Author
http://www.appaholics.in/ - Founder

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

Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread skink


Raghav Sood wrote:
> It shows button.
>
> Anyways, doing a clean build appears to have solved it.
>
> Thanks for the help.
>

Ok, but if you had class cast exception it must have been TextView
which you were trying to cast to a Button and this cast was makinkg
class cast ex

pakink

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


Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread Raghav Sood
It shows button.

Anyways, doing a clean build appears to have solved it.

Thanks for the help.

On Sun, Jan 8, 2012 at 4:44 PM, skink  wrote:

>
>
> Raghav Sood wrote:
> >  >
> > android:id="@+id/reset"
> >
> > android:layout_width="wrap_content"
> >
> > android:layout_height="wrap_content"
> >
> > android:layout_below="@+id/maxAcceleration"
> >
> > android:layout_centerHorizontal="true"
> >
> > android:layout_marginTop="80dp"
> >
> > android:gravity="center"
> >
> > android:text="@string/reset"
> >
> > android:textSize="32sp" />
> >
> >
> > It's a button.
> >
> >
>
> then try:
>
> View v=findViewById(R.id. reset);
> Log .d(TAG, "v=" + v);
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Raghav Sood
http://www.androidactivist.org/ - Author
http://www.appaholics.in/ - Founder

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

Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread skink


Raghav Sood wrote:
> 
> android:id="@+id/reset"
>
> android:layout_width="wrap_content"
>
> android:layout_height="wrap_content"
>
> android:layout_below="@+id/maxAcceleration"
>
> android:layout_centerHorizontal="true"
>
> android:layout_marginTop="80dp"
>
> android:gravity="center"
>
> android:text="@string/reset"
>
> android:textSize="32sp" />
>
>
> It's a button.
>
>

then try:

View v=findViewById(R.id. reset);
Log .d(TAG, "v=" + v);

pskink

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


Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread Raghav Sood



It's a button.


Thanks

On Sun, Jan 8, 2012 at 3:45 PM, skink  wrote:

>
>
> Raghav Sood wrote:
> > There's nothing unclear, but according to the docs, the Button inherits
> the
> > setTypeface() from the TextView and it should work. However, I get this
> > exception when using it.
> >
> > Even the similar questions on StackOverflow on setting the font of the
> > Button say to use setTypeface(). It doesn't seem to be working though.
> >
> > I set it like this:
> >
> > typeFace1 = Typeface.createFromAsset(getAssets(), "fonta.ttf");
> >
> > final Button button = (Button) findViewById(R.id.reset);
> >
> > button.setTypeface(typeFace1);
> >
> >
> > Any idea on how I could set the typeface of the button?
> >
> >
> > Thanks
> >
> > On Sun, Jan 8, 2012 at 3:35 PM, skink  wrote:
> >
> > > what's unclear in that stack trace?
> > >
> > > java.lang.ClassCastException:
> > > android.widget.TextView cannot be
> > > cast to
> > > android.widget.Button
> > >
> > > pskink
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > > http://groups.google.com/group/android-developers?hl=en
> >
> >
> >
> >
> > --
> > Raghav Sood
> > http://www.androidactivist.org/ - Author
> > http://www.appaholics.in/ - Founder
>
> what is R.ud.reset?  paste layout xml
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Raghav Sood
http://www.androidactivist.org/ - Author
http://www.appaholics.in/ - Founder

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

Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread skink


Raghav Sood wrote:
> There's nothing unclear, but according to the docs, the Button inherits the
> setTypeface() from the TextView and it should work. However, I get this
> exception when using it.
>
> Even the similar questions on StackOverflow on setting the font of the
> Button say to use setTypeface(). It doesn't seem to be working though.
>
> I set it like this:
>
> typeFace1 = Typeface.createFromAsset(getAssets(), "fonta.ttf");
>
> final Button button = (Button) findViewById(R.id.reset);
>
> button.setTypeface(typeFace1);
>
>
> Any idea on how I could set the typeface of the button?
>
>
> Thanks
>
> On Sun, Jan 8, 2012 at 3:35 PM, skink  wrote:
>
> > what's unclear in that stack trace?
> >
> > java.lang.ClassCastException:
> > android.widget.TextView cannot be
> > cast to
> > android.widget.Button
> >
> > pskink
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Raghav Sood
> http://www.androidactivist.org/ - Author
> http://www.appaholics.in/ - Founder

what is R.ud.reset?  paste layout xml

pskink

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


Re: [android-developers] Re: Button not excepting typeface

2012-01-08 Thread Raghav Sood
There's nothing unclear, but according to the docs, the Button inherits the
setTypeface() from the TextView and it should work. However, I get this
exception when using it.

Even the similar questions on StackOverflow on setting the font of the
Button say to use setTypeface(). It doesn't seem to be working though.

I set it like this:

typeFace1 = Typeface.createFromAsset(getAssets(), "fonta.ttf");

final Button button = (Button) findViewById(R.id.reset);

button.setTypeface(typeFace1);


Any idea on how I could set the typeface of the button?


Thanks

On Sun, Jan 8, 2012 at 3:35 PM, skink  wrote:

> what's unclear in that stack trace?
>
> java.lang.ClassCastException:
> android.widget.TextView cannot be
> cast to
> android.widget.Button
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Raghav Sood
http://www.androidactivist.org/ - Author
http://www.appaholics.in/ - Founder

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

[android-developers] Re: Button not excepting typeface

2012-01-08 Thread skink
what's unclear in that stack trace?

java.lang.ClassCastException:
android.widget.TextView cannot be
cast to
android.widget.Button

pskink

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


[android-developers] Re: Button not excepting typeface

2012-01-08 Thread Raghav Sood
Sorry, that got sent incomplete. The logcat gives me:

01-08 14:55:41.757: E/ACRA(15317): java.lang.RuntimeException: Unable to
start activity
ComponentInfo{com.raghavsood.gravity/com.raghavsood.gravity.Forceometer}:
java.lang.ClassCastException: android.widget.TextView cannot be cast to
android.widget.Button
01-08 14:55:41.757: E/ACRA(15317): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.ActivityThread.access$600(ActivityThread.java:123)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
01-08 14:55:41.757: E/ACRA(15317): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-08 14:55:41.757: E/ACRA(15317): at
android.os.Looper.loop(Looper.java:137)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.ActivityThread.main(ActivityThread.java:4424)
01-08 14:55:41.757: E/ACRA(15317): at
java.lang.reflect.Method.invokeNative(Native Method)
01-08 14:55:41.757: E/ACRA(15317): at
java.lang.reflect.Method.invoke(Method.java:511)
01-08 14:55:41.757: E/ACRA(15317): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-08 14:55:41.757: E/ACRA(15317): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-08 14:55:41.757: E/ACRA(15317): at dalvik.system.NativeStart.main(Native
Method)
01-08 14:55:41.757: E/ACRA(15317): Caused by: java.lang.ClassCastException:
android.widget.TextView cannot be cast to android.widget.Button
01-08 14:55:41.757: E/ACRA(15317): at
com.raghavsood.gravity.Forceometer.onCreate(Forceometer.java:87)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.Activity.performCreate(Activity.java:4465)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-08 14:55:41.757: E/ACRA(15317): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
01-08 14:55:41.757: E/ACRA(15317): ... 11 more

I know the font is fine as I use it in two other textviews and it works
brilliantly. I have tried this on a 2.3 device, and ICS on the Nexus S.
Doesn't work on either.

Thanks

On Sun, Jan 8, 2012 at 2:55 PM, Raghav Sood
wrote:

> Hi all,
>
> I was updating the ui to one of my apps, and encountered a problem setting
> the typeface of the button. According to the online docs, calling
> setTypeface() on a button should work. However, I get the following error:
>
>  java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.raghavsood.gravity/com.raghavsood.gravity.Forceometer}:
> java.lang.ClassCastException: android.widget.TextView cannot be cast to
> android.widget.Button
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.app.ActivityThread.access$600(ActivityThread.java:123)
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.os.Looper.loop(Looper.java:137)
> 01-08 14:55:41.757: E/ACRA(15317): at
> android.app.ActivityThread.main(ActivityThread.java:4424)
> 01-08 14:55:41.757: E/ACRA(15317): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 01-08 14:55:41.757: E/ACRA(15317): at
> java.lang.reflect.Method.invoke(Method.java:511)
> 01-08 14:55:41.757: E/ACRA(15317): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
>   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
>   at dalvik.system.NativeStart.main(Native Method)
> Caused by: java.lang.ClassCastException: android.widget.TextView
> cannot be cast to android.widget.Button
>   at com.raghavsood.gravity.Forceometer.onCreate(Forceometer.java:87)
>   at android.app.Activity.performCreate(Activity.java:4465)
>   at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
>   at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
> ... 11 more
>
>
> --
> Raghav Sood
> http://www.androidactivist.org/ - Author
> http://www.appaholics.in/ - Founder
>
>


-- 
Raghav Sood
http://www.androidactivist.org/ - Author
http://www.appaholics.in/ - Founder

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

[android-developers] Re: button

2011-11-07 Thread Chrystian Vieyra
Button.setTextColor(color);

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

[android-developers] Re: Button Animation

2011-10-16 Thread F4L|{0
thanks for answer
Yes I used android:fillAfter but this is used to fix the animation.

can somebody help me?

On 14 Ott, 17:14, Justin Anderson  wrote:
> Perhaps this is what you are looking for?  Never used it so I'm not sure,
> but look at this animation property:
>
> http://developer.android.com/reference/android/view/animation/Animati...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
>
>
>
>
>
>
> On Fri, Oct 14, 2011 at 8:28 AM, TreKing  wrote:
> > On Fri, Oct 14, 2011 at 8:54 AM, F4L|{0 wrote:
>
> >> because i don't know how do it. :)
>
> > What did you try? There are numerous functions on View that would appear to
> > allow you to manipulate its layout properties.
>
> > --- 
> > --
> > TreKing  - Chicago
> > transit tracking app for Android-powered devices
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Button Animation

2011-10-16 Thread F4L|{0
thanks for answer
Yes I used android:fillAfter but this is used to fix the animation.

can somebody help me?

On 14 Ott, 17:14, Justin Anderson  wrote:
> Perhaps this is what you are looking for?  Never used it so I'm not sure,
> but look at this animation property:
>
> http://developer.android.com/reference/android/view/animation/Animati...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
>
>
>
>
>
>
> On Fri, Oct 14, 2011 at 8:28 AM, TreKing  wrote:
> > On Fri, Oct 14, 2011 at 8:54 AM, F4L|{0 wrote:
>
> >> because i don't know how do it. :)
>
> > What did you try? There are numerous functions on View that would appear to
> > allow you to manipulate its layout properties.
>
> > --- 
> > --
> > TreKing  - Chicago
> > transit tracking app for Android-powered devices
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Button Animation

2011-10-14 Thread Justin Anderson
Perhaps this is what you are looking for?  Never used it so I'm not sure,
but look at this animation property:

http://developer.android.com/reference/android/view/animation/Animation.html#attr_android:fillAfter

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Oct 14, 2011 at 8:28 AM, TreKing  wrote:

> On Fri, Oct 14, 2011 at 8:54 AM, F4L|{0 wrote:
>
>> because i don't know how do it. :)
>
>
> What did you try? There are numerous functions on View that would appear to
> allow you to manipulate its layout properties.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Button Animation

2011-10-14 Thread F4L|{0
for example i find this:

exchangeAnimation.setAnimationListener(new AnimationListener() {
  public void onAnimationStart(Animation anim)
{button.setEnabled(false);}
  public void onAnimationRepeat(Animation anim) {}
  public void onAnimationEnd(Animation anim) {
  LinearLayout.LayoutParams params = new
LinearLayout.LayoutParams(
  LinearLayout.LayoutParams.WRAP_CONTENT,
  LinearLayout.LayoutParams.WRAP_CONTENT);
  button.setLayoutParams(params);
  button.setEnabled(true);}});

but this don't have effect.
sorry for so many questions, but I'm beginner in the field

On 14 Ott, 16:28, TreKing  wrote:
> On Fri, Oct 14, 2011 at 8:54 AM, F4L|{0  wrote:
> > because i don't know how do it. :)
>
> What did you try? There are numerous functions on View that would appear to
> allow you to manipulate its layout properties.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Button Animation

2011-10-14 Thread TreKing
On Fri, Oct 14, 2011 at 8:54 AM, F4L|{0  wrote:

> because i don't know how do it. :)


What did you try? There are numerous functions on View that would appear to
allow you to manipulate its layout properties.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Button Animation

2011-10-14 Thread F4L|{0
because i don't know how do it. :)
I searched a lot on internet, I have not found anything that could
help me

On 14 Ott, 15:45, TreKing  wrote:
> On Fri, Oct 14, 2011 at 8:40 AM, F4L|{0  wrote:
> > but I wasn't able to update update the button position.
>
> Why not?
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Button Animation

2011-10-14 Thread TreKing
On Fri, Oct 14, 2011 at 8:40 AM, F4L|{0  wrote:

> but I wasn't able to update update the button position.
>

Why not?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Button Animation

2011-10-14 Thread F4L|{0
thanks for answer

the my problem is how i can update the button position when the
animation  ends.
I know that when the animation is ended is called onAnimationEnd of
AnimationListner, but I wasn't able to update update the button
position.

On 14 Ott, 14:01, TreKing  wrote:
> On Fri, Oct 14, 2011 at 2:49 AM, F4L|{0  wrote:
> > somebody can help me on how to correctly position the hit area of
> > the button?
>
> AFAIK, animations only make it look like an object is moving / scaling /
> whatever. The actual position / size / whatever of the View in unchanged. If
> you want the position to update, manually update it when the animation is
> finished.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Button Issue

2011-09-17 Thread Mark Murphy
The button is centered properly, most likely. However, the button background
may have some whitespace at the bottom. Check the button background images
in the SDK.

On Sat, Sep 17, 2011 at 1:48 PM, giles ian  wrote:

> Has nobody faced this problem ?? i checked the images in android sdk .. the
> button is slightly upwards .. any solution/workaround ??
>
> On Sat, Sep 17, 2011 at 10:44 AM, giles ian wrote:
>
>>
>> There is some space at bottom of the bottom. Its not centered vertically
>> properly even after using android:layout_centerVertical="true". If u look
>> very closely the button is occupying all space vertically (lite shade of
>> green around button after selection) but the actual button image is slightly
>> upwards.
>>
>>
>> [image: issue1.JPG]
>>
>> emulator:
>> [image: issue2.JPG]
>>
>> > android:id="@+id/image_bar_bottom" android:layout_height="0dip"
>> android:layout_width="fill_parent" android:layout_weight="1">
>>
>> > android:layout_width="wrap_content" android:layout_height="fill_parent"
>> android:layout_centerHorizontal="true"
>> android:layout_centerVertical="true">
>>
>> 
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in Oslo: http://bit.ly/fjBo24

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

[android-developers] Re: Button Issue

2011-09-17 Thread giles ian
Has nobody faced this problem ?? i checked the images in android sdk .. the
button is slightly upwards .. any solution/workaround ??

On Sat, Sep 17, 2011 at 10:44 AM, giles ian  wrote:

>
> There is some space at bottom of the bottom. Its not centered vertically
> properly even after using android:layout_centerVertical="true". If u look
> very closely the button is occupying all space vertically (lite shade of
> green around button after selection) but the actual button image is slightly
> upwards.
>
>
> [image: issue1.JPG]
>
> emulator:
> [image: issue2.JPG]
>
>  android:id="@+id/image_bar_bottom" android:layout_height="0dip"
> android:layout_width="fill_parent" android:layout_weight="1">
>
>  android:layout_width="wrap_content" android:layout_height="fill_parent"
> android:layout_centerHorizontal="true"
> android:layout_centerVertical="true">
>
> 
>

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

[android-developers] Re: button id causes app to crash

2011-08-01 Thread DB12
I got it working, somehow it was crashing because I wasn't assigning
the ID I created for a button to any handler, strange.

On Aug 1, 8:11 am, DB12  wrote:
>         mAddCoInfo = (EditText) findViewById(R.id.addCoInfo);
>         mAddPltInfo = (EditText) findViewById(R.id.addPltInfo);
>         mAddSquadInfo = (EditText) findViewById(R.id.addSquadInfo);
>         mPickWeapon = (EditText) findViewById(R.id.pickWeapon);
>         mPickDist = (EditText) findViewById(R.id.pickDist);
>         mPickLocation = (EditText) findViewById(R.id.pickLocation);
>
>         mAddData = (Button) findViewById(R.id.addData);
>         mPickDate = (Button) findViewById(R.id.pickDate);
>
>         deleteModeOn = new ImageView(getApplicationContext());
>         deleteModeOn.setImageResource(R.drawable.deletenotification);
>
> this is all my code is doing around line 60, could it be that I have aidfor 
> abuttonin the xml file but I don't have it assigned to a
> handler variable assigned to it?
>
> On Jul 29, 2:48 pm, Adam Ratana  wrote:
>
>
>
>
>
>
>
> > On Friday, July 29, 2011 12:58:04 PM UTC-4, DB12 wrote:
>
> > > Adam, that makes some sense, I'll investigate it.
>
> > > I took my app home from work and for some reason it did not crash when
> > > I added that 3rdid(my home comp runs windows 7).  Then I took it
> > > back to work (where we have xp) and it works fine with the extraid.
> > > But then I added another custom dialog with 3 buttons and it crashed
> > > again.
>
> > The other thing I found is that sometimes you may need to check all your
> > XMLs for any errors, too.  But if its getting a class cast exception and
> > you're absolutely positive theIDyou're using is the right one, it's
> > probably an R generation issue, it may not be ordering the IDs right so
> > yours is now pointing to the wrong type of view.

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


Re: [android-developers] Re: button id causes app to crash

2011-08-01 Thread TreKing
On Mon, Aug 1, 2011 at 7:11 AM, DB12  wrote:

>mAddData = (Button) findViewById(R.id.addData);
>mPickDate = (Button) findViewById(R.id.pickDate);
>

I don't know which of these is line 60, but what I would do is replace this
with:

View temp1 = findViewById(R.id.addData);
View temp2 = findViewById(R.id.pickDate);

Then use your debugger see the actual type you're getting for the offending
variable.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: button id causes app to crash

2011-08-01 Thread DB12
mAddCoInfo = (EditText) findViewById(R.id.addCoInfo);
mAddPltInfo = (EditText) findViewById(R.id.addPltInfo);
mAddSquadInfo = (EditText) findViewById(R.id.addSquadInfo);
mPickWeapon = (EditText) findViewById(R.id.pickWeapon);
mPickDist = (EditText) findViewById(R.id.pickDist);
mPickLocation = (EditText) findViewById(R.id.pickLocation);

mAddData = (Button) findViewById(R.id.addData);
mPickDate = (Button) findViewById(R.id.pickDate);

deleteModeOn = new ImageView(getApplicationContext());
deleteModeOn.setImageResource(R.drawable.deletenotification);

this is all my code is doing around line 60, could it be that I have a
id for a button in the xml file but I don't have it assigned to a
handler variable assigned to it?

On Jul 29, 2:48 pm, Adam Ratana  wrote:
> On Friday, July 29, 2011 12:58:04 PM UTC-4, DB12 wrote:
>
> > Adam, that makes some sense, I'll investigate it.
>
> > I took my app home from work and for some reason it did not crash when
> > I added that 3rd id (my home comp runs windows 7).  Then I took it
> > back to work (where we have xp) and it works fine with the extra id.
> > But then I added another custom dialog with 3 buttons and it crashed
> > again.
>
> The other thing I found is that sometimes you may need to check all your
> XMLs for any errors, too.  But if its getting a class cast exception and
> you're absolutely positive the ID you're using is the right one, it's
> probably an R generation issue, it may not be ordering the IDs right so
> yours is now pointing to the wrong type of view.

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


[android-developers] Re: button id causes app to crash

2011-07-29 Thread Adam Ratana
On Friday, July 29, 2011 12:58:04 PM UTC-4, DB12 wrote:
>
> Adam, that makes some sense, I'll investigate it. 
>
> I took my app home from work and for some reason it did not crash when 
> I added that 3rd id (my home comp runs windows 7).  Then I took it 
> back to work (where we have xp) and it works fine with the extra id. 
> But then I added another custom dialog with 3 buttons and it crashed 
> again. 
>
>
The other thing I found is that sometimes you may need to check all your 
XMLs for any errors, too.  But if its getting a class cast exception and 
you're absolutely positive the ID you're using is the right one, it's 
probably an R generation issue, it may not be ordering the IDs right so 
yours is now pointing to the wrong type of view. 

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

Re: [android-developers] Re: button id causes app to crash

2011-07-29 Thread TreKing
On Fri, Jul 29, 2011 at 12:01 PM, DB12  wrote:

> E/AndroidRuntime(  351): Caused by:
> java.lang.ClassCastException: android.widget.Button
> E/AndroidRuntime(  351):
>  at com.alion.android.rangecard.MainActivity.onCreate(MainActivity.java:60)
>

OK. And now the code at and around your onCreate method, line 60.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: button id causes app to crash

2011-07-29 Thread DB12
heres the log

D/AndroidRuntime(  344):
D/AndroidRuntime(  344): >> AndroidRuntime START
<<
D/AndroidRuntime(  344): CheckJNI is ON
D/AndroidRuntime(  344): --- registering native functions ---
D/ddm-heap(  344): Got feature list request
I/ActivityManager(   52): Starting activity: Intent
{ act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000
cmp=com.alion.android
.rangecard/.MainActivity }
I/ActivityManager(   52): Start proc com.alion.android.rangecard for
activity co
m.alion.android.rangecard/.MainActivity: pid=351 uid=10028 gids={1015}
D/AndroidRuntime(  344): Shutting down VM
D/dalvikvm(  344): DestroyJavaVM waiting for non-daemon threads to
exit
D/dalvikvm(  344): DestroyJavaVM shutting VM down
D/dalvikvm(  344): HeapWorker thread shutting down
D/dalvikvm(  344): HeapWorker thread has shut down
D/jdwp(  344): JDWP shutting down net...
I/dalvikvm(  344): Debugger has detached; object registry had 1
entries
D/dalvikvm(  344): VM cleaning up
E/AndroidRuntime(  344): ERROR: thread attach failed
D/dalvikvm(  344): LinearAlloc 0x0 used 639500 of 5242880 (12%)
D/ddm-heap(  351): Got feature list request
D/dalvikvm(  351): GC freed 682 objects / 53944 bytes in 105ms
D/AndroidRuntime(  351): Shutting down VM
W/dalvikvm(  351): threadid=3: thread exiting with uncaught exception
(group=0x4
001b188)
E/AndroidRuntime(  351): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime(  351): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.alion.android.rangecard/
com.alion.android.rangecard.MainActivity
}: java.lang.ClassCastException: android.widget.Button
E/AndroidRuntime(  351):at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2496)
E/AndroidRuntime(  351):at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2512)
E/AndroidRuntime(  351):at android.app.ActivityThread.access
$2200(Activi
tyThread.java:119)
E/AndroidRuntime(  351):at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:1863)
E/AndroidRuntime(  351):at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime(  351):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  351):at
android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime(  351):at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  351):at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime(  351):at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(  351):at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime(  351):at
dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(  351): Caused by: java.lang.ClassCastException:
android.widget
.Button
E/AndroidRuntime(  351):at
com.alion.android.rangecard.MainActivity.onCr
eate(MainActivity.java:60)
E/AndroidRuntime(  351):at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime(  351):at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2459)
E/AndroidRuntime(  351):... 11 more
I/Process (   52): Sending signal. PID: 351 SIG: 3
I/dalvikvm(  351): threadid=7: reacting to signal 3
E/dalvikvm(  351): Unable to open stack trace file '/data/anr/
traces.txt': Permi
ssion denied
I/Process (  351): Sending signal. PID: 351 SIG: 9
I/ActivityManager(   52): Process com.alion.android.rangecard (pid
351) has died
.
I/UsageStats(   52): Unexpected resume of com.android.launcher while
already res
umed in com.alion.android.rangecard
E/gralloc (   52): [unregister] handle 0x4b08d8 still locked
(state=4001)
W/InputManagerService(   52): Window already focused, ignoring focus
gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44dcb100
E/gralloc (   52): [unregister] handle 0x4bff90 still locked
(state=4001)
D/dalvikvm(  172): GC freed 192 objects / 8832 bytes in 127ms

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


[android-developers] Re: button id causes app to crash

2011-07-29 Thread DB12
Adam, that makes some sense, I'll investigate it.

I took my app home from work and for some reason it did not crash when
I added that 3rd id (my home comp runs windows 7).  Then I took it
back to work (where we have xp) and it works fine with the extra id.
But then I added another custom dialog with 3 buttons and it crashed
again.

On Jul 28, 10:22 am, Adam Ratana  wrote:
> On Wednesday, July 27, 2011 9:11:08 AM UTC-4, DB12 wrote:
>
> > the app crashes when you try to load it, i don't even get to press the
> > button that opens my custom dialog
>
> > On Jul 22, 11:41 am, DB12  wrote:
> > > Howdy, I searched for about 30 minutes to see if anyone had the same
> > > issue but couldn't find anything.
>
> > I've had this happen before, typically when refactoring resources and such.
>
>  Try to "Clean" your project and then rebuild it, what is happening here
> most likely is that R.java is not getting re-generated correctly so it is
> using the wrong identifier mapping for your button id.   Another example of
> this type of behavior is when you see the wrong images being loaded right
> after you do some renaming of image resources.

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


[android-developers] Re: button id causes app to crash

2011-07-28 Thread Adam Ratana
On Wednesday, July 27, 2011 9:11:08 AM UTC-4, DB12 wrote:
>
> the app crashes when you try to load it, i don't even get to press the 
> button that opens my custom dialog 
>
> On Jul 22, 11:41 am, DB12  wrote: 
> > Howdy, I searched for about 30 minutes to see if anyone had the same 
> > issue but couldn't find anything. 
>
> I've had this happen before, typically when refactoring resources and such. 
 Try to "Clean" your project and then rebuild it, what is happening here 
most likely is that R.java is not getting re-generated correctly so it is 
using the wrong identifier mapping for your button id.   Another example of 
this type of behavior is when you see the wrong images being loaded right 
after you do some renaming of image resources.

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

[android-developers] Re: button id causes app to crash

2011-07-28 Thread DB12
I tried several different id names and none of them worked, but I just
tried my app on a different computer and it worked fine with three
button id's in the dialog (which is what crashed the emulator on my
other one ).  I will try to recreate the problem on the original
computer and post the full log


On Jul 27, 10:54 am, TreKing  wrote:
> On Wed, Jul 27, 2011 at 9:34 AM, DB12  wrote:
> > if im reading it correctly it says
> > "java.lang.ClassCastException: android.widget.button"
>
> You want to just post the full stack trace you get? Particularly the part
> including and after the "Caused by" line.
>
> is there a limit to the amount of buttons you can have in a custom dialog?
>
>
>
> No and this does not indicate that would be the problem. Did you try a
> different id other than "random"?
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: button id causes app to crash

2011-07-27 Thread TreKing
On Wed, Jul 27, 2011 at 9:34 AM, DB12  wrote:

> if im reading it correctly it says
> "java.lang.ClassCastException: android.widget.button"
>

You want to just post the full stack trace you get? Particularly the part
including and after the "Caused by" line.

is there a limit to the amount of buttons you can have in a custom dialog?
>

No and this does not indicate that would be the problem. Did you try a
different id other than "random"?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: button id causes app to crash

2011-07-27 Thread DB12
if im reading it correctly it says "java.lang.ClassCastException:
android.widget.button"

is there a limit to the amount of buttons you can have in a custom
dialog?

On Jul 27, 9:11 am, Raghav Sood  wrote:
> I think TreKing meant what is the logcat or stacktrace?
>
>
>
>
>
>
>
>
>
> On Wed, Jul 27, 2011 at 6:37 PM, DB12  wrote:
> > it crashes as soon as the app loads, before I even push the button to
> > display my custom dialog
>
> > On Jul 26, 11:40 am, TreKing  wrote:
> > > On Fri, Jul 22, 2011 at 10:41 AM, DB12  wrote:
> > > > and this one gives me a force close runtime exception when my app
> > starts
>
> > > And the exception would be ... ?
>
> > -
> > > TreKing  - Chicago
> > > transit tracking app for Android-powered devices
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Raghav 
> Soodhttp://www.raghavsood.com/http://wiki.androidappcheck.com/http://www.telstop.tel/https://market.android.com/developer?pub=Appaholics

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


Re: [android-developers] Re: button id causes app to crash

2011-07-27 Thread Raghav Sood
I think TreKing meant what is the logcat or stacktrace?

On Wed, Jul 27, 2011 at 6:37 PM, DB12  wrote:

> it crashes as soon as the app loads, before I even push the button to
> display my custom dialog
>
> On Jul 26, 11:40 am, TreKing  wrote:
> > On Fri, Jul 22, 2011 at 10:41 AM, DB12  wrote:
> > > and this one gives me a force close runtime exception when my app
> starts
> >
> > And the exception would be ... ?
> >
> >
> -
> > TreKing  - Chicago
> > transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Appaholics

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

[android-developers] Re: button id causes app to crash

2011-07-27 Thread DB12
the app crashes when you try to load it, i don't even get to press the
button that opens my custom dialog

On Jul 22, 11:41 am, DB12  wrote:
> Howdy, I searched for about 30 minutes to see if anyone had the same
> issue but couldn't find anything.
>
> I have a custom dialog I created with a relative layout, when the user
> clicks on abuttonit brings up the dialog just fine normally.  I
> added a few buttons to the dialog layout and this is where the trouble
> begins. For some reason when I add anidto the thirdbutton, my I get
> a runtime exception/force close dialog when my app starts up.  If the
> thirdbuttonhas noid, the app works fine.  The other two buttons
> already haveid'sand work great.
> so in summary...
>
> this layout works fine
> 
> http://schemas.android.com/apk/res/
> android"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent">
>              android:id="@+id/cancel"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_alignParentRight="true"
>         android:text="Cancel" />
>              android:id="@+id/line"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_alignParentLeft="true"
>         android:text="Line" />
>              android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_toRightOf="@id/line"
>         android:text="Vehicle" />
> 
>
> and this one gives me a force close runtime exception when my app
> starts
> 
> http://schemas.android.com/apk/res/
> android"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent">
>              android:id="@+id/cancel"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_alignParentRight="true"
>         android:text="Cancel" />
>              android:id="@+id/line"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_alignParentLeft="true"
>         android:text="Line" />
>              android:id="@+id/random"   <
> this is the only difference between the two
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_toRightOf="@id/line"
>         android:text="Vehicle" />
> 

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


[android-developers] Re: button id causes app to crash

2011-07-27 Thread DB12
it crashes as soon as the app loads, before I even push the button to
display my custom dialog

On Jul 26, 11:40 am, TreKing  wrote:
> On Fri, Jul 22, 2011 at 10:41 AM, DB12  wrote:
> > and this one gives me a force close runtime exception when my app starts
>
> And the exception would be ... ?
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Button in a ListView cell

2011-05-08 Thread Muhammad Danish Khan
Did u added ur click listener under the adapter or just calling it as we
adds the listener on list item?

--
Sent from Android

On May 7, 2011 12:02 AM, "B Lyon"  wrote:
> I take it you looked through this
>
> http://developer.android.com/resources/articles/touch-mode.html
>
> (which was new to me)
>
> On Fri, May 6, 2011 at 1:59 PM, Eric  wrote:
>>
>>
>> On May 6, 1:38 pm, B Lyon  wrote:
>>> Did you play with descendantFocusibility at all?
>>
>> Not yet.  I would like to avoid an time-consuming and arbitrary number
>> of tag permutation changes if I can find the proper solution up-
>> front.  descendantFocusibility does seem to look promising, but I'm
>> not convince it will work in all of the 6 cases I specified above.
>>
>> The problem with using the 'normal' ListView OnItemClickedListener()
>> is that if you have a clickable-button in the list view item, the
>> ListView item no longer respond to click events at all.
>> descendantFocusibility may indeed be the answer, but it would be nice
>> to hear from someone who has all this working.  It should be
>> completely possible, I am not asking for much here -- just
>> functionality that you would expect from the list view in the first
>> place.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: Button in a ListView cell

2011-05-06 Thread B Lyon
I take it you looked through this

http://developer.android.com/resources/articles/touch-mode.html

(which was new to me)

On Fri, May 6, 2011 at 1:59 PM, Eric  wrote:
>
>
> On May 6, 1:38 pm, B Lyon  wrote:
>> Did you play with descendantFocusibility at all?
>
> Not yet.  I would like to avoid an time-consuming and arbitrary number
> of tag permutation changes if I can find the proper solution up-
> front.  descendantFocusibility does seem to look promising, but I'm
> not convince it will work in all of the 6 cases I specified above.
>
> The problem with using the 'normal' ListView OnItemClickedListener()
> is that if you have a clickable-button in the list view item, the
> ListView item no longer respond to click events at all.
> descendantFocusibility may indeed be the answer, but it would be nice
> to hear from someone who has all this working.  It should be
> completely possible, I am not asking for much here -- just
> functionality that you would expect from the list view in the first
> place.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Button in a ListView cell

2011-05-06 Thread Eric


On May 6, 1:38 pm, B Lyon  wrote:
> Did you play with descendantFocusibility at all?

Not yet.  I would like to avoid an time-consuming and arbitrary number
of tag permutation changes if I can find the proper solution up-
front.  descendantFocusibility does seem to look promising, but I'm
not convince it will work in all of the 6 cases I specified above.

The problem with using the 'normal' ListView OnItemClickedListener()
is that if you have a clickable-button in the list view item, the
ListView item no longer respond to click events at all.
descendantFocusibility may indeed be the answer, but it would be nice
to hear from someone who has all this working.  It should be
completely possible, I am not asking for much here -- just
functionality that you would expect from the list view in the first
place.

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


Re: [android-developers] Re: Button in a ListView cell

2011-05-06 Thread B Lyon
Did you play with descendantFocusibility at all?

On Fri, May 6, 2011 at 1:24 PM, B Lyon  wrote:
> hey
>
> well, I'm really curious what is going on.  I've got some extra
> buttons/imagebuttons and a text view inserted into the row and they
> don't interfere with each other, but that is not the case you are
> looking at (and you obviously already know how to do that).  Looks
> like there is a trackball mode on the emulator I can play with if
> you've got a snippet to play with.   I might be able to try to
> implement what you're doing in something I have.
>
>
>
> On Fri, May 6, 2011 at 1:14 PM, Eric  wrote:
>> I am going to surmise it is safe to assume there is no way to achieve
>> this in Android, due to lack of responses and being unable to find
>> anyone else who has been able to do it?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>

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


[android-developers] Re: Button in a ListView cell

2011-05-06 Thread Eric
I am going to surmise it is safe to assume there is no way to achieve
this in Android, due to lack of responses and being unable to find
anyone else who has been able to do it?

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


Re: [android-developers] Re: Button in a ListView cell

2011-05-05 Thread Giorgio Torres
so, worked?

On Thu, May 5, 2011 at 8:57 PM, B Lyon  wrote:

> I've recently added extra buttons to each row of a listactivity that
> can then do whatever, but your case sounds a little more involved.
>
> On Thu, May 5, 2011 at 7:20 PM, Eric  wrote:
> >
> >
> > On May 5, 7:11 pm, B Lyon  wrote:
> >> So you were able to get everything to work without the trackball case?
> >
> > It depends on what you mean by 'work'.  I was able to hack things to
> > work.  The ListView steals focus from the inner-widgets if you set an
> > OnItemClickListener.  So I had to set an OnClickListener() on the
> > ListView item View, and a separate OnClickListener() for the child
> > button.  That works in so much as touch-clicks work, but the trackball/
> > D-pad is broken for clicks.  Furthermore, I still haven't been able to
> > figure out how to get the trackball to be able to focus into the
> > Button instead of the entire list view cell.
> >
> > So, no, I would not say I have things working to anywhere near my
> > satisfaction.  I am hoping there is one solution that will allow
> > everything to work as I would expect it to above, which is in my
> > opinion that way the UI should function.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Giorgio Prímola F. G. Torres
Graduando em Ciência da Computação
Universidade Federal de Viçosa



  



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

Re: [android-developers] Re: Button in a ListView cell

2011-05-05 Thread B Lyon
I've recently added extra buttons to each row of a listactivity that
can then do whatever, but your case sounds a little more involved.

On Thu, May 5, 2011 at 7:20 PM, Eric  wrote:
>
>
> On May 5, 7:11 pm, B Lyon  wrote:
>> So you were able to get everything to work without the trackball case?
>
> It depends on what you mean by 'work'.  I was able to hack things to
> work.  The ListView steals focus from the inner-widgets if you set an
> OnItemClickListener.  So I had to set an OnClickListener() on the
> ListView item View, and a separate OnClickListener() for the child
> button.  That works in so much as touch-clicks work, but the trackball/
> D-pad is broken for clicks.  Furthermore, I still haven't been able to
> figure out how to get the trackball to be able to focus into the
> Button instead of the entire list view cell.
>
> So, no, I would not say I have things working to anywhere near my
> satisfaction.  I am hoping there is one solution that will allow
> everything to work as I would expect it to above, which is in my
> opinion that way the UI should function.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Button in a ListView cell

2011-05-05 Thread Giorgio Torres
Eric, I don't know much about Android yet, I just started studying it.
Do you know much of programing concepts? Mainly inheritance?

It happens that,l i think button its not a View, so, you wont be able to add
it to a ListView.

Try build a row composed by a Linear or a Relative layout. Add it your
schemma of the line, with textviews and button. Then use this new row
into your ListView. I think it may work.

I cheer here for you! Feedback me if it works.

On Thu, May 5, 2011 at 8:20 PM, Eric  wrote:

>
>
> On May 5, 7:11 pm, B Lyon  wrote:
> > So you were able to get everything to work without the trackball case?
>
> It depends on what you mean by 'work'.  I was able to hack things to
> work.  The ListView steals focus from the inner-widgets if you set an
> OnItemClickListener.  So I had to set an OnClickListener() on the
> ListView item View, and a separate OnClickListener() for the child
> button.  That works in so much as touch-clicks work, but the trackball/
> D-pad is broken for clicks.  Furthermore, I still haven't been able to
> figure out how to get the trackball to be able to focus into the
> Button instead of the entire list view cell.
>
> So, no, I would not say I have things working to anywhere near my
> satisfaction.  I am hoping there is one solution that will allow
> everything to work as I would expect it to above, which is in my
> opinion that way the UI should function.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Giorgio Prímola F. G. Torres
Graduando em Ciência da Computação
Universidade Federal de Viçosa



  



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

[android-developers] Re: Button in a ListView cell

2011-05-05 Thread Eric


On May 5, 7:11 pm, B Lyon  wrote:
> So you were able to get everything to work without the trackball case?

It depends on what you mean by 'work'.  I was able to hack things to
work.  The ListView steals focus from the inner-widgets if you set an
OnItemClickListener.  So I had to set an OnClickListener() on the
ListView item View, and a separate OnClickListener() for the child
button.  That works in so much as touch-clicks work, but the trackball/
D-pad is broken for clicks.  Furthermore, I still haven't been able to
figure out how to get the trackball to be able to focus into the
Button instead of the entire list view cell.

So, no, I would not say I have things working to anywhere near my
satisfaction.  I am hoping there is one solution that will allow
everything to work as I would expect it to above, which is in my
opinion that way the UI should function.

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


[android-developers] Re: Button in a ListView cell

2011-05-05 Thread Eric
and also:

6. The trackball D-pad will ideally allow me to navigate not only to
every cell in the ListView, but also navigate over the clickable
Button and give it trackball focus such that I can run the Button
action from the Trackball.

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


[android-developers] Re: Button code

2011-04-28 Thread Zsolt Vasvari
Me no likey docy.

On Apr 28, 5:03 pm, Marcin Orlowski  wrote:
> Create object of Button class and add it to your layout. All is in
> documentation. All you need it is to read it.
>
> Regards,
> Marcin Orlowski
>
> *Tray Agenda * - keep you daily schedule handy...
> *Date In Tray*  - current date at glance...
> WebnetMobile on *Facebook * and
> *Twitter
> *
>
> On 27 April 2011 23:43, rishabh agrawal  wrote:
>
>
>
> > How to crate button & also called without using xml.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Re: Button color - StateListDrawable question

2010-12-09 Thread AUandroid
thanks, I will try that way

On Dec 9, 9:26 am, Mark Murphy  wrote:
> The StateListDrawable and nine-patch PNG resources used by a Button
> are in your SDK. Copy them into your project and modify to suit.
>
>
>
> On Thu, Dec 9, 2010 at 10:24 AM, AUandroid  wrote:
> > I am allowing the user to change the color of the buttons. I want to
> > maintain the default drawables used for focused and onPressed state
> > and apply the color only when the button is neither  pressed nor
> > focused.
>
> > I am currently achieving this by checking the state of the view in
> > onDraw() on the button class and apply the color filter if it is
> > neither pressed or focused, else I am passing null to color filter.
>
> > Is there any easier way of doing this? Is there a way to get the
> > default StateListDrawable of the button and change only the desired
> > state drawable. I have too many views in my layout and I am trying to
> > reduce any work done in onDraw method as it is slows down the
> > layout.Thanks
>
> > -VK
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

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


[android-developers] Re: Button placement problems

2010-12-05 Thread Serdel
Thanks for your contribution Kostya - this really helped with greater
understanding of Android layout designing, which is quite annoying to
be 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Button placement problems

2010-12-04 Thread Kostya Vasilyev
As far as I understand, for you, the background is more important, and 
the buttons should be placed at certain positions within the background.


Well, there is no law that says you have to use layout_margin and dp 
units for positioning your buttons (ImageViews).


Write your own ViewGroup subclass, override onDraw() to draw the 
background with some kind of scaling logic, and override onLayout() to 
position the buttons where they should be .


-- Kostya

04.12.2010 14:53, Serdel пишет:

But the problem is to place them on the same area on the screen. I
only could come up with margins but I try to avoid that. Right now I
have solved this by grouping the buttons in a linear layout and set
the background of this layout. Then the layout is placed inside a
parent relative layout and align to the bottom. However I can imagine
other situations where this would be insufficient.




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Button placement problems

2010-12-04 Thread Serdel
But the problem is to place them on the same area on the screen. I
only could come up with margins but I try to avoid that. Right now I
have solved this by grouping the buttons in a linear layout and set
the background of this layout. Then the layout is placed inside a
parent relative layout and align to the bottom. However I can imagine
other situations where this would be insufficient.

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


Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev
Adam,

The "in-front/behind" order by default is the order in which views are
declared in the XML file. The order, first to last (XML) becomes back to
front (on screen).

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
03.12.2010 22:35 пользователь "Serdel" 
написал:
> As long as you have been so helpful - do you know any way to put an
> imageview (or any other object) deliberately "behind" other objects?
> For example if I would like to put an image behind my buttons to make
> a background for the small gap between them (and I want this gap to be
> filled - don't want them to merge into one since they have they are
> the same color).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
As long as you have been so helpful - do you know any way to put an
imageview (or any other object) deliberately "behind" other objects?
For example if I would like to put an image behind my buttons to make
a background for the small gap between them (and I want this gap to be
filled - don't want them to merge into one since they have they are
the same color).

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you Kostya and sorry for my mistake :>

The ImageView approach works. Though the eclipse layout 'designer'
doesn't show this (the images are cropped) it works on the device.
Again thanks for the solution.

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you Kostya and sorry for my mistake :>

The ImageView approach works. Though the eclipse layout 'designer'
doesn't show this (the images are cropped) it works on the device.
Again thanks for the solution.

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


Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev

03.12.2010 19:37, Serdel пишет:

Thanks Vasilyev,


It's "Kostya" (V. is my last name).


The aspect ration is in deed a very important factor - I was surprised
why my layout looks fine in eclipse plug in but corrupts on the
device. Only when I design my own dev config with proper size and
ratio as long it worked correct. I now have a quite similar problem.
Because I have design some images for the background of my buttons (I
use button not imagebuttons to avoid the white 'frame' around the
image). However the images are bigger than I expected them to be.
Using my example - images for B1 and B2 (despite being 240px long) are
much longer than the half of the screen.


If they are in res/drawable, they are considered "mdpi" images (for 320 
by 480 screen size, etc).


If your emulator is higher-res (typical for 480 by 800, etc.), then 
Android will scale those images at load time, by a factor of 1,5 (hdpi 
is 240 pixels per inch, mdpi is 160 pixels per inch).


You should carefully read through "multiple screen support" link you 
referred to in your previous email to understand image resource scaling.


Then I'd recommend you make your layouts work at default resolution & 
density (320 by 480, medium screen density) and only then move onto 
high-density and high-resolution screens.



If I place them with relative
layout they overlap. If I switch to linear layout with weigth 1 the
width is adjusted properly however the height stays the same (I need
to set it manually which I would like to avoid). Can I somehow do it
so the image would resize both its dimensions automatically to keep
it's previous ratio? So that If I fit the images with linear layout
their height would also shrink due to 'forced' shorted width?
You could use ImageView, it has a lot of flexibility for image scaling 
and resizing:


http://developer.android.com/reference/android/widget/ImageView.html

In particular, take a look at these settings: adjustViewBounds, 
cropToPadding, scaleType.


You can set a click listener on an ImageView, and can implement visual 
feedback for when it's touched by using a state-list drawable with 
state_pressed:


http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

-- Kostya

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thanks Vasilyev,

The aspect ration is in deed a very important factor - I was surprised
why my layout looks fine in eclipse plug in but corrupts on the
device. Only when I design my own dev config with proper size and
ratio as long it worked correct. I now have a quite similar problem.
Because I have design some images for the background of my buttons (I
use button not imagebuttons to avoid the white 'frame' around the
image). However the images are bigger than I expected them to be.
Using my example - images for B1 and B2 (despite being 240px long) are
much longer than the half of the screen. If I place them with relative
layout they overlap. If I switch to linear layout with weigth 1 the
width is adjusted properly however the height stays the same (I need
to set it manually which I would like to avoid). Can I somehow do it
so the image would resize both its dimensions automatically to keep
it's previous ratio? So that If I fit the images with linear layout
their height would also shrink due to 'forced' shorted width?

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thanks Vasilyev,

The aspect ration is in deed a very important factor - I was surprised
why my layout looks fine in eclipse plug in but corrupts on the
device. Only when I design my own dev config with proper size and
ratio as long it worked correct. I now have a quite similar problem.
Because I have design some images for the background of my buttons (I
use button not imagebuttons to avoid the white 'frame' around the
image). However the images are bigger than I expected them to be.
Using my example - images for B1 and B2 (despite being 240px long) are
much longer than the half of the screen. If I place them with relative
layout they overlap. If I switch to linear layout with weigth 1 the
width is adjusted properly however the height stays the same (I need
to set it manually which I would like to avoid). Can I somehow do it
so the image would resize both its dimensions automatically to keep
it's previous ratio? So that If I fit the images with linear layout
their height would also shrink due to 'forced' shorted width?

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


Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev

Here are a few ideas:

1. Create a background that has the maximum possible aspect ratio: it's 
16:9 (1.777) for 480 by 854, and less than that for 480 by 800 (1.66), 
1024 by 600 (1.7) and 320 by 480 (1.5).


Push the background to the top when drawing, so that the bottom part is 
clipped on devices with smaller aspect ratio (320 by 480.


Place the buttons at a fixed position, specified in "dp" units (device 
independent).


This should cover phones, as well as tablets.

2. Scale the background or use a nine-patch.

Implement your own subclass of ViewGroup that can position the buttons, 
calculating their positions based on screen resolution and aspect ratio.


As a further enhancement, create several background at several common 
aspect ratios (I'd pick 1.7 and 1.5).


-- Kostya

03.12.2010 15:05, Serdel пишет:

Thank you all for your response. I am now reading about supporting
multiple screens in android :
http://developer.android.com/guide/practices/screens_support.html

My problem is that the buttons must be preciously placed to correspond
properly with the background (that's why the accurate, exact dip
values like 291). I can support multiple layout but how much of them I
am inf act able to present - giving different layouts for each device
is quite pointless (and the main problem is in the layout not the size
of images).




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you all for your response. I am now reading about supporting
multiple screens in android :
http://developer.android.com/guide/practices/screens_support.html

My problem is that the buttons must be preciously placed to correspond
properly with the background (that's why the accurate, exact dip
values like 291). I can support multiple layout but how much of them I
am inf act able to present - giving different layouts for each device
is quite pointless (and the main problem is in the layout not the size
of images).

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


Re: [android-developers] Re: Button placement problems

2010-12-01 Thread Daniel Drozdzewski
2010/12/1 Serdel :
> Thanks for the response. Yeah the centered_vertical is not necessary.
> I put because I was wondering whether I can o a margin from the center
> of the screen. For the second question - yes I need the space. The B1
> should be placed below the center of the screen, and B2 and B3 should
> be in the bottom right/left corner of the screen. I figured out that
> B2 and B3 can also be placed by relativeLayot with aligning to bottom-
> right\left. But still B1 is a problem. I am using Samsung i5700
> (Android 1.5), and Acer liquid E (android 2.1).
>
> Btw. Daniel are you from Poland? If so: Dzięki za odpowiedź :>
>

Serdel,

as suggested here, try using relative layout and you will have to be
more careful about your screens and dimensions with regards to
layouts.
Samsung i5700 is a mdpi device (320x480 pix) and Acer Liquid is hdpi
one(480x800 pix). As a result even though you were using B1's top
margin expressed in DIPs, you would see a shift in the position of it.

Btw, I am from Poland, so Nie ma za co!


Daniel

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


Re: [android-developers] Re: Button placement problems

2010-12-01 Thread Kostya Vasilyev

01.12.2010 16:29, kernelpanic пишет:

if you are using a relative layout with b2&  b3 achored to the bottom
left/right respectively - can you then declare b1 after these in the
XML and align it above b2




You can declare b1 after b2/3 and set layout_above="@id/b2" or "b3".

http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_above

Positioning the top edge of b1 just below the center of the screen is a 
bit more tricky. I wish there were settings for width/height that meant 
"x%" of available space.


What would work is:




 




The invisible view is there just to take up space and push the top edge 
of RelativeLayout to the middle of the screen (this is done by setting 
equal values for layout_weight).


Then there is a top margin on the relative layout to push its top edge 
some more, by a fixed amount.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Button placement problems

2010-12-01 Thread kernelpanic
if you are using a relative layout with b2 & b3 achored to the bottom
left/right respectively - can you then declare b1 after these in the
XML and align it above b2


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


[android-developers] Re: Button placement problems

2010-12-01 Thread Serdel
Thanks for the response. Yeah the centered_vertical is not necessary.
I put because I was wondering whether I can o a margin from the center
of the screen. For the second question - yes I need the space. The B1
should be placed below the center of the screen, and B2 and B3 should
be in the bottom right/left corner of the screen. I figured out that
B2 and B3 can also be placed by relativeLayot with aligning to bottom-
right\left. But still B1 is a problem. I am using Samsung i5700
(Android 1.5), and Acer liquid E (android 2.1).

Btw. Daniel are you from Poland? If so: Dzięki za odpowiedź :>

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


[android-developers] Re: button on screen that controls page sliding

2010-11-29 Thread Dyno
I've used the viewflipper along with some of the slide animations to
change a view.  I also used a gesture detector to capture the swipe
input.  The problem with doing it this way is that the gesture is only
an initiator - ie. it wont do any movement of your view until the full
gesture is detected.  See this tutorial for a little help ..
http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/

In the comments it also talks about having a swipe that does something
as your finger moves, however this is beyond me :)


D



On Nov 25, 8:12 pm, Mark Murphy  wrote:
> On Thu, Nov 25, 2010 at 3:08 PM, timecatcher3  wrote:
> > I want to use the ViewFlipper or ViewSwitcher with animation but want
> > to control the sliding like the sliding drawer button does for the
> > Android App Menu?
>
> Neither ViewFlipper nor ViewSwitcher are designed for that scenario.
> At most, they animate the old content off the screen, then animate the
> new content onto the screen.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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


Re: [android-developers] Re: button on screen that controls page sliding

2010-11-26 Thread Vinay Julme
For going from one Activity to another with animation you can use
overridePendingTransition() but this won't help in drag Have a look at this
tutorial where
I found this guy pretty useful.
http://www.inter-fuser.com/2009/07/android-transistions-slide-in-and-slide.html

Vinay
Julme
**

On Fri, Nov 26, 2010 at 3:07 AM, TreKing  wrote:

> On Thu, Nov 25, 2010 at 2:08 PM, timecatcher3 wrote:
>
>> I want to use the ViewFlipper or ViewSwitcher with animation but want
>> to control the sliding like the sliding drawer button does for the
>> Android App Menu?
>>
>
> On Tue, Nov 23, 2010 at 5:15 PM, TreKing  wrote:
>
>> OK ... this is pretty broad. What do you have working so far? Where
>> exactly are you having trouble?
>
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>
>   --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: button on screen that controls page sliding

2010-11-25 Thread TreKing
On Thu, Nov 25, 2010 at 2:08 PM, timecatcher3 wrote:

> I want to use the ViewFlipper or ViewSwitcher with animation but want
> to control the sliding like the sliding drawer button does for the
> Android App Menu?
>

On Tue, Nov 23, 2010 at 5:15 PM, TreKing  wrote:

> OK ... this is pretty broad. What do you have working so far? Where exactly
> are you having trouble?


-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: button on screen that controls page sliding

2010-11-25 Thread Mark Murphy
On Thu, Nov 25, 2010 at 3:08 PM, timecatcher3  wrote:
> I want to use the ViewFlipper or ViewSwitcher with animation but want
> to control the sliding like the sliding drawer button does for the
> Android App Menu?

Neither ViewFlipper nor ViewSwitcher are designed for that scenario.
At most, they animate the old content off the screen, then animate the
new content onto the screen.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

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


[android-developers] Re: button on screen that controls page sliding

2010-11-25 Thread timecatcher3
Hi TreKing,

I want to use the ViewFlipper or ViewSwitcher with animation but want
to control the sliding like the sliding drawer button does for the
Android App Menu?

On Nov 23, 6:15 pm, TreKing  wrote:
> On Sat, Nov 20, 2010 at 4:51 PM, timecatcher3 wrote:
>
> > I wanted to make a button on one of
> > my activities that I can drag to slide my current activity page to the
> > next activity page. The button will be in the center of the screen and
> > I want to be able to press and drag it horizontally to one end of the
> > screen while I am dragging my button I can see my current activity
> > page moving. It is actually like when one slides on the home screen
> > and can control the sliding depending on how far he slides his finger
> > on the screen.
>
> OK ... this is pretty broad. What do you have working so far? Where exactly
> are you having trouble?
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: button placement problem

2010-10-08 Thread TreKing
On Fri, Oct 8, 2010 at 11:11 AM, Varun Khanduja wrote:

> The button at the bottom of the picture in the tutorial is somethign I am
> trying to achieve.
>

Not a very good tutorial if you can't get it to work :P

I don't know about that, but I would start by looking at setting a footer
view on the ListView.


-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: button placement problem

2010-10-08 Thread Varun Khanduja
The button at the bottom of the picture in the tutorial is somethign I
am trying to achieve.

http://blog.maxaller.name/2010/05/attaching-a-sticky-headerfooter-to-an-android-listview/

On Oct 8, 5:33 am, TreKing  wrote:
> On Thu, Oct 7, 2010 at 6:13 PM, Varun Khanduja wrote:
>
> > I am trying to get a button at bottom of a screen having a list view.
>
> Could you add more detail to the problem you're having and the outcome
> you're trying to achieve?
> A picture of each case would help as well if you have it.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-26 Thread Lucas Boucher
2 Words

THANK YOU!!

On Sun, Sep 26, 2010 at 1:34 PM, Kostya Vasilyev  wrote:

> Move the declaration of done_once into the anonynous inner class itself, so
> it's the same variable between first and subsequent calls to this function.
>
> The way you had it, as a method-local, meant it was getting created and
> initialized to "false" every time through. In other words, doing nothing.
>
> -- Kostya
>
> 26.09.2010 20:44, Lucas Boucher пишет:
>
> "Check GPS Status Again.", new DialogInterface.OnClickListener() {
>
> ***
>
> boolean done_once = false;
> *
>
> @Override
>
>
>  public void onClick(DialogInterface dialog, int id) {
> ((AlertDialog)
> dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);
> *
> *
> *
>
> if
> *(!done_once)
>
> {
> if (latitude == 0 || longitude == 0)
> {
> gps_initialized=
> false
> ;
> dialog.dismiss();
> main();
> }
> else
> {
> gps_initialized=
> true;
> dialog.dismiss();
> main();
> }
> }
>
> }
> });
>
>
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget -- 
> http://kmansoft.wordpress.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
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Lucas Boucher
www.pachristmas.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-26 Thread Kostya Vasilyev
 Move the declaration of done_once into the anonynous inner class 
itself, so it's the same variable between first and subsequent calls to 
this function.


The way you had it, as a method-local, meant it was getting created and 
initialized to "false" every time through. In other words, doing nothing.


-- Kostya

26.09.2010 20:44, Lucas Boucher ?:

"Check GPS Status Again.", new DialogInterface.OnClickListener() {

_* *__*

boolean done_once = false;

*_

@Override



public void onClick(DialogInterface dialog, int id) {
((AlertDialog) 
dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);

*
**

if

*(!done_once)

{
if (latitude == 0 || longitude == 0)
{
gps_initialized=
false
;
dialog.dismiss();
main();
}
else
{
gps_initialized=
true;
dialog.dismiss();
main();
}
}

}
});




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-26 Thread Lucas Boucher
Understood and fixed, now onStart is called nowhere in my app.

Here is where my code currently stands, and i can still button mash it.
I am starting to wonder if this will happen on the actual hardware.


gps_init_alt_bld =
new AlertDialog.Builder(this);
gps_init_alt_bld.setMessage(
"GPS Not Initialized Yet.")
.setCancelable(
false)
.setPositiveButton(
"Check GPS Status Again.", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
((AlertDialog)
dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);
*

boolean* done_once = *false*;
*

if*(!done_once)

{
if (latitude == 0 || longitude == 0)
{
gps_initialized=
false
;
dialog.dismiss();
main();
}
else
{
gps_initialized=
true;
dialog.dismiss();
main();
}
}

}
});

On Sun, Sep 26, 2010 at 12:19 PM, Mark Murphy wrote:

> On Sun, Sep 26, 2010 at 12:06 PM, Lucas Boucher 
> wrote:
> > I don't see how my calls to onStart()
> > would cause this specific issue and don't want to fix something that
> isn't
> > broke just to make code look better.
>
> Except it is broke. Do not call onStart() of an activity yourself, please.
>
> > All my app needs to do is go thru a sequence of checks, gps, gps init,
> > internet availability, is my location in some list, then display a pic.
> > If it fails anywhere along the line I wanted to throw a dialog box.
> > The user can check whatever errored.
> > Then i just want to run thru the whole sequence again.
>
> Then move "the whole sequence" into another method, that you call from
> onStart() and your dialog button.
>
> > Thus I called onStart().
>
> This does not "start the whole program again". What it will do is
> confuse the heck out of the Activity base class. Do not do this.
>
> While restarting your activity seems like a wasteful solution, to do
> this, call startActivity(getIntent()), followed by finish(). The first
> statement should run another copy of your Activity; the second
> statement will get rid of your existing copy.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training...At Your Office: http://commonsware.com/training
>
> --
>  You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Lucas Boucher
www.pachristmas.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-26 Thread Mark Murphy
On Sun, Sep 26, 2010 at 12:06 PM, Lucas Boucher  wrote:
> I don't see how my calls to onStart()
> would cause this specific issue and don't want to fix something that isn't
> broke just to make code look better.

Except it is broke. Do not call onStart() of an activity yourself, please.

> All my app needs to do is go thru a sequence of checks, gps, gps init,
> internet availability, is my location in some list, then display a pic.
> If it fails anywhere along the line I wanted to throw a dialog box.
> The user can check whatever errored.
> Then i just want to run thru the whole sequence again.

Then move "the whole sequence" into another method, that you call from
onStart() and your dialog button.

> Thus I called onStart().

This does not "start the whole program again". What it will do is
confuse the heck out of the Activity base class. Do not do this.

While restarting your activity seems like a wasteful solution, to do
this, call startActivity(getIntent()), followed by finish(). The first
statement should run another copy of your Activity; the second
statement will get rid of your existing copy.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-26 Thread Lucas Boucher
 Well the overall answer is.
This is my first Droid App and first time using Java. I am an ME and thus
not so professionally experienced on how to layout and plan software. I more
just jump in and start hacking away.  So due to that I made an improper
design decision at the start of this app. Now that I am almost done, i
really don't care to fix it. Everything else in the program works fine,
except this button mashing issue. I don't see how my calls to onStart()
would cause this specific issue and don't want to fix something that isn't
broke just to make code look better.

To explain my overall design that lead me to call onStart()
All my app needs to do is go thru a sequence of checks, gps, gps init,
internet availability, is my location in some list, then display a pic.
If it fails anywhere along the line I wanted to throw a dialog box.
The user can check whatever errored.
Then i just want to run thru the whole sequence again.

So to me, the real answer to any dialog box was to just start the whole
program again.
Thus I called onStart().
If everything was up and running the first time, the whle program would go
the whole way thru without displaying one single dialog box to the user and
the app would finish what it needed to do.

On Sun, Sep 26, 2010 at 4:19 AM, Doug  wrote:

> Again I ask:  why do you need to call onStart()?  That's reserved as a
> callback for Android during its activity lifecycle maintenance.
>
> --
>  You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Lucas Boucher
www.pachristmas.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Button Mashing Alert Dialog

2010-09-26 Thread Doug
Again I ask:  why do you need to call onStart()?  That's reserved as a
callback for Android during its activity lifecycle maintenance.

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


Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-25 Thread Kostya Vasilyev
Try having a boolean in your onClick callback class (the anonymous inner
one), and check/set its value before taking action.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

26.09.2010 9:31 пользователь "Lucas Boucher"  написал:

Also note, There is a difference when this bug happens.
So when doing this normally you see the alert dialog fully fade away.
When the bug happens it looks like it starts to fade for a brief instant
then comes back fully.
Not sure what I am actually seeing here.

Ugg, about to say the heck with it, if you button mash this is what you
should expect. (I actually hate saying that because i test software at work,
and hate stupid little things like this. To me they make the software look
half baked.)

On Sun, Sep 26, 2010 at 12:58 AM, Lucas Boucher 
wrote:
>
> For reference I am...

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

Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-25 Thread Lucas Boucher
Also note, There is a difference when this bug happens.
So when doing this normally you see the alert dialog fully fade away.
When the bug happens it looks like it starts to fade for a brief instant
then comes back fully.
Not sure what I am actually seeing here.

Ugg, about to say the heck with it, if you button mash this is what you
should expect. (I actually hate saying that because i test software at work,
and hate stupid little things like this. To me they make the software look
half baked.)

On Sun, Sep 26, 2010 at 12:58 AM, Lucas Boucher wrote:

> For reference I am working on a SIM and I can actually see the dam button
> grey out, just keep getting multiple alertdialogs if I button mash. If I go
> at a normal pace everything works perfect.
>
>
> On Sun, Sep 26, 2010 at 12:38 AM, Lucas Boucher wrote:
>
>> Ya, been trying to disable that button, but not having much luck
>>
>> Currently got this far, but I can still button mash and get multiple alert
>> dialogs showing up.
>>
>> So frustrating.
>>
>>
>>
>> gps_init_alt_bld =
>> *new* AlertDialog.Builder(*this*);
>>
>> gps_init_alt_bld.setMessage(
>> "GPS Not Initialized Yet.")
>>
>> .setCancelable(
>> *false*)
>>
>> .setPositiveButton(
>> "Check GPS Status Again.", *new* DialogInterface.OnClickListener() {
>>
>> *public* *void* onClick(DialogInterface dialog, *int* id) {
>>
>> // Action for 'Yes' Button
>>
>> //dialog = (AlertDialog) dialog;
>>
>> //dialog = (AlertDialog) dialog;
>>
>> ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(
>> *false*);
>>
>> *if* (latitude == 0 || longitude == 0)
>>
>> {
>>
>> gps_initialized=
>> *false*
>> ;
>>
>> dialog.dismiss();
>>
>> onStart();
>>
>> }
>>
>> *else*
>>
>> {
>>
>> gps_initialized=
>> *true*;
>>
>> dialog.dismiss();
>>
>> onStart();
>>
>> }
>>
>> }
>>
>> });
>>
>>
>>   On Sat, Sep 25, 2010 at 10:44 AM, Streets Of Boston <
>> flyingdutc...@gmail.com> wrote:
>>
>>> And in to avoid button-mashing in general, you could disable the
>>> button when clicked.
>>>
>>> On Sep 25, 2:05 am, Doug  wrote:
>>> > Why would you ever call onStart() manually (assuming that it's the
>>> > onStart of your activity)?
>>> >
>>> > You might want to look into using showDialog() provided by Activity if
>>> > you want to manage dialogs that may appear repeatedly.  And don't call
>>> > any of the activity lifecycle methods directly.
>>> >
>>> > Doug
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> Lucas Boucher
>> www.pachristmas.com
>>
>
>
>
> --
> Lucas Boucher
> www.pachristmas.com
>



-- 
Lucas Boucher
www.pachristmas.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-25 Thread Lucas Boucher
For reference I am working on a SIM and I can actually see the dam button
grey out, just keep getting multiple alertdialogs if I button mash. If I go
at a normal pace everything works perfect.

On Sun, Sep 26, 2010 at 12:38 AM, Lucas Boucher wrote:

> Ya, been trying to disable that button, but not having much luck
>
> Currently got this far, but I can still button mash and get multiple alert
> dialogs showing up.
>
> So frustrating.
>
>
>
> gps_init_alt_bld =
> *new* AlertDialog.Builder(*this*);
>
> gps_init_alt_bld.setMessage(
> "GPS Not Initialized Yet.")
>
> .setCancelable(
> *false*)
>
> .setPositiveButton(
> "Check GPS Status Again.", *new* DialogInterface.OnClickListener() {
>
> *public* *void* onClick(DialogInterface dialog, *int* id) {
>
> // Action for 'Yes' Button
>
> //dialog = (AlertDialog) dialog;
>
> //dialog = (AlertDialog) dialog;
>
> ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(
> *false*);
>
> *if* (latitude == 0 || longitude == 0)
>
> {
>
> gps_initialized=
> *false*
> ;
>
> dialog.dismiss();
>
> onStart();
>
> }
>
> *else*
>
> {
>
> gps_initialized=
> *true*;
>
> dialog.dismiss();
>
> onStart();
>
> }
>
> }
>
> });
>
>
>   On Sat, Sep 25, 2010 at 10:44 AM, Streets Of Boston <
> flyingdutc...@gmail.com> wrote:
>
>> And in to avoid button-mashing in general, you could disable the
>> button when clicked.
>>
>> On Sep 25, 2:05 am, Doug  wrote:
>> > Why would you ever call onStart() manually (assuming that it's the
>> > onStart of your activity)?
>> >
>> > You might want to look into using showDialog() provided by Activity if
>> > you want to manage dialogs that may appear repeatedly.  And don't call
>> > any of the activity lifecycle methods directly.
>> >
>> > Doug
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Lucas Boucher
> www.pachristmas.com
>



-- 
Lucas Boucher
www.pachristmas.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Button Mashing Alert Dialog

2010-09-25 Thread Lucas Boucher
Ya, been trying to disable that button, but not having much luck

Currently got this far, but I can still button mash and get multiple alert
dialogs showing up.

So frustrating.



gps_init_alt_bld = *new* AlertDialog.Builder(*this*);

gps_init_alt_bld.setMessage("GPS Not Initialized Yet.")

.setCancelable(*false*)

.setPositiveButton("Check GPS Status Again.",
*new*DialogInterface.OnClickListener() {

*public* *void* onClick(DialogInterface dialog, *int* id) {

// Action for 'Yes' Button

//dialog = (AlertDialog) dialog;

//dialog = (AlertDialog) dialog;

((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(*
false*);

*if* (latitude == 0 || longitude == 0)

{

gps_initialized=*false*;

dialog.dismiss();

onStart();

}

*else
*

{

gps_initialized=*true*;

dialog.dismiss();

onStart();

}

}

});


On Sat, Sep 25, 2010 at 10:44 AM, Streets Of Boston  wrote:

> And in to avoid button-mashing in general, you could disable the
> button when clicked.
>
> On Sep 25, 2:05 am, Doug  wrote:
> > Why would you ever call onStart() manually (assuming that it's the
> > onStart of your activity)?
> >
> > You might want to look into using showDialog() provided by Activity if
> > you want to manage dialogs that may appear repeatedly.  And don't call
> > any of the activity lifecycle methods directly.
> >
> > Doug
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Lucas Boucher
www.pachristmas.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

  1   2   >