[android-developers] List View inside a Layout

2010-12-28 Thread Sergio Luceno
Hi all..

What I want to do is:

I have a layout with some textviews and buttons.

I want to add to this layout a simple listView with a String, i mean.
a simple ListView not a custom one.

this is my layout more or less:

Layout screen
TextView/
Button/
ListView/
/LayoutScreen

So, I did a lot of google, but all the examples that i found is for an
activity which layout only contains a ListView, simple or custom, but
just only a ListView.

In my case i don't know how to populate the my list View... I don't
know what i am doing bad


Can you help me?

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


[android-developers] How can I achieve this menu in android?

2010-12-28 Thread Sergio Luceno
I saw that a lot of applications has a menu at the bottom. A menu wich
is always visible.

Here you can find an example:

http://www.droid.net.au/wp-content/uploads/2010/04/Touiteur-main-screen-more.png
or
http://www.android.com/market/data/screenshots/com.cuisiner1.png

I tried to do this, with a tabHost... following the android
tutorial... But my buttons have Tab Styles...

I want to have square buttons like those ones i shown on the links...

Also i have a padding between tabs, and on the left and right side...
i wannt skip that


Can I do what i wanna do with the tabhost? Is that possible? Does
someone has any clue?

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


[android-developers] Re: How can I achieve this menu in android?

2010-12-30 Thread Sergio Luceno
Thanks both of you!

Today I'm starting to implement it.

Thanks a lot!

On 30 dic, 08:25, Muhammad Hakim hakim...@gmail.com wrote:
 you can user 
 framelayouthttp://developer.android.com/resources/articles/layout-tricks-merge.html

 On Thu, Dec 30, 2010 at 12:27 PM, Sarwar Erfan erfanonl...@gmail.comwrote:









  Its not built in control. Design your own menu like layout, put it in
  separate layout file and include where necessary. It is possible to keep
  this layout at the bottom of the screen always and make the upper part
  scrollable. Just give up the idea that this is a real menu. Lots of code
  sample are available (only if you give up the word menu and try to achieve
  the result using layouts)

  On the other hand, if you do not want to make it look like a copy of iPhone
  (as your example applications do), you can use the normal menu of Androoid
 http://developer.android.com/guide/topics/ui/menus.html
  Off course, you have to show it as soon as your activity loads.

  Or, you can create your own control if you like to.

  Regards
  Sarwar Erfan

   --
  You received this message because you are subscribed to the Google
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Best Regards,
 hakimhttp://jampasir.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] Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
Hi all,

Is there a way to force the application not keep running after close
it?

When the user closes de applications, it always is running memory.

Is it possible to define some at the manifest to force the app to be
removed from the memory?

I was trying to find out some parameter at the manifest... but I
didn't find nothing


Thanks in advance

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


[android-developers] Best way to schedule a task?

2011-01-17 Thread Sergio Luceno
Hi!

My application has to be syncronized every 5 minutes against a server.
I have to schedule a HTTP call to my server to get sync.

What is the best way to achieve that?

Now I tried to make a timer with a handler.
I'm passing a message every 5 minutes to execute my action.

Thanks in advance.

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


[android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
I wanna do that, because I have a task running on background. And i
wanna stop it when the application is closed. This task is doing http
calls every X minutes to sync the application data over internet.

Also, android OS keep the state of the application and open it at the
last activity where the user was on.

I would like to open the application always by the main activity. also
this main activity is doing a login call, which receive the session id
to make more http calls. I have a risk to loose the session id, while
the user is not using the app and it stills in memory for a long time.



On 17 ene, 11:55, Kumar Bibek coomar@gmail.com wrote:
 Why would you try to do that? The OS would get rid of it whenever it feels
 necessary. ie, whenever, the device runs low on memory.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com







 On Mon, Jan 17, 2011 at 4:22 PM, Sergio Luceno slucen...@gmail.com wrote:
  Hi all,

  Is there a way to force the application not keep running after close
  it?

  When the user closes de applications, it always is running memory.

  Is it possible to define some at the manifest to force the app to be
  removed from the memory?

  I was trying to find out some parameter at the manifest... but I
  didn't find nothing

  Thanks in advance

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@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: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
I wanna do that, because I have a task running on background. And i
wanna stop it when the application is closed. This task is doing http
calls every X minutes to sync the application data over internet.

Also, android OS keep the state of the application and open it at the
last activity where the user was on.

I would like to open the application always by the main activity. also
this main activity is doing a login call, which receive the session id
to make more http calls. I have a risk to loose the session id, while
the user is not using the app and it stills in memory for a long time.


On 17 ene, 11:55, Kumar Bibek coomar@gmail.com wrote:
 Why would you try to do that? The OS would get rid of it whenever it feels
 necessary. ie, whenever, the device runs low on memory.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com







 On Mon, Jan 17, 2011 at 4:22 PM, Sergio Luceno slucen...@gmail.com wrote:
  Hi all,

  Is there a way to force the application not keep running after close
  it?

  When the user closes de applications, it always is running memory.

  Is it possible to define some at the manifest to force the app to be
  removed from the memory?

  I was trying to find out some parameter at the manifest... but I
  didn't find nothing

  Thanks in advance

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@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: Best way to schedule a task?

2011-01-17 Thread Sergio Luceno
thanks Kostya,

I don't know if I explained well what i wanna mean when i say sync the
app.

What i try to have sync is the data of the application. I mean, the
user can modify his data through movile device, or accessing via web,
in the future maybe through facebook, etc.

So i think is quite enough if the process run only while the user is
using the application. I think i don't need sync while the user is
doing whatever and my app is on memory. Or maybe yes i don't
know. :D

I am gonna take a look to AlarmManager.

On 17 ene, 12:04, Kostya Vasilyev kmans...@gmail.com wrote:
 Sergio,

 A Handler only works for as long as your process is alive, which may not
 be a good thing.

 Use AlarmManager for scheduling - it can wake the phone up (if you need
 this) and will reload the process if it was kicked out of memory.

 For the actual updates, take a look at IntentService (part of SDK) or
 WakefulIntentService (Mark Murphy's enhanced version, Google for it).

 -- Kostya

 2011/1/17 Sergio Luceno slucen...@gmail.com







  Hi!

  My application has to be syncronized every 5 minutes against a server.
  I have to schedule a HTTP call to my server to get sync.

  What is the best way to achieve that?

  Now I tried to make a timer with a handler.
  I'm passing a message every 5 minutes to execute my action.

  Thanks in advance.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@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: Best way to schedule a task?

2011-01-17 Thread Sergio Luceno
Ohh thanks, i thought that Timer + Handler will open a new thread
instead of be on the main UI thread.

So, i can combine a timer + handler + AsyncTask, right? If I
understood I think is what you said.

Thanks Kostya!

On 17 ene, 12:27, Kostya Vasilyev kmans...@gmail.com wrote:
 Oh, I see.

 You might not need a service or alarms then - a Handler with postAtTime()
 should do the trick.

 Since you'll be doing networking, make you do it from a background thread,
 so as to not block the application's UI.

 Android provides a class that makes this easy: AsyncTask.

 -- Kostya

 2011/1/17 Sergio Luceno slucen...@gmail.com







  thanks Kostya,

  I don't know if I explained well what i wanna mean when i say sync the
  app.

  What i try to have sync is the data of the application. I mean, the
  user can modify his data through movile device, or accessing via web,
  in the future maybe through facebook, etc.

  So i think is quite enough if the process run only while the user is
  using the application. I think i don't need sync while the user is
  doing whatever and my app is on memory. Or maybe yes i don't
  know. :D

  I am gonna take a look to AlarmManager.

  On 17 ene, 12:04, Kostya Vasilyev kmans...@gmail.com wrote:
   Sergio,

   A Handler only works for as long as your process is alive, which may
  not
   be a good thing.

   Use AlarmManager for scheduling - it can wake the phone up (if you need
   this) and will reload the process if it was kicked out of memory.

   For the actual updates, take a look at IntentService (part of SDK) or
   WakefulIntentService (Mark Murphy's enhanced version, Google for it).

   -- Kostya

   2011/1/17 Sergio Luceno slucen...@gmail.com

Hi!

My application has to be syncronized every 5 minutes against a server.
I have to schedule a HTTP call to my server to get sync.

What is the best way to achieve that?

Now I tried to make a timer with a handler.
I'm passing a message every 5 minutes to execute my action.

Thanks in advance.

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@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.comandroid-developers%2Bunsubs 
  cr...@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: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
Hi!

I tried to set up the setting finishOnTaskLaunch to true at all my
activities... but when I click home and then open my app again, it
didn't start at the main activity, it start at the same activity that
was running when i clicked the home button...

On 17 ene, 12:23, Kostya Vasilyev kmans...@gmail.com wrote:
 Sergio,

 To stop the background task - stop the background task.

 It's your own code, so it's under your control. The framework tells you when
 things happen via activity state callbacks (onPause / onResume), you just
 need to do the right thing with them.

 For your second issue:

 http://developer.android.com/guide/topics/manifest/activity-element.html

 set clearTaskOnLaunch to true.

 -- Kostya

 2011/1/17 Sergio Luceno slucen...@gmail.com







  I wanna do that, because I have a task running on background. And i
  wanna stop it when the application is closed. This task is doing http
  calls every X minutes to sync the application data over internet.

  Also, android OS keep the state of the application and open it at the
  last activity where the user was on.

  I would like to open the application always by the main activity. also
  this main activity is doing a login call, which receive the session id
  to make more http calls. I have a risk to loose the session id, while
  the user is not using the app and it stills in memory for a long time.

  On 17 ene, 11:55, Kumar Bibek coomar@gmail.com wrote:
   Why would you try to do that? The OS would get rid of it whenever it
  feels
   necessary. ie, whenever, the device runs low on memory.

   Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

   On Mon, Jan 17, 2011 at 4:22 PM, Sergio Luceno slucen...@gmail.com
  wrote:
Hi all,

Is there a way to force the application not keep running after close
it?

When the user closes de applications, it always is running memory.

Is it possible to define some at the manifest to force the app to be
removed from the memory?

I was trying to find out some parameter at the manifest... but I
didn't find nothing

Thanks in advance

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@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.comandroid-developers%2Bunsubs 
  cr...@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: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
true, sorry i was using clearTaskOnLaunch.

I tried to set this to true in the main activity... ando also in all
activities.

But it still not working.

here is how i define my main activity.

activity android:name=.Init
  android:label=@string/app_name
  clearTaskOnLaunch=true
  android:theme=@android:style/Theme.NoTitleBar
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity



On 17 ene, 16:49, Kostya Vasilyev kmans...@gmail.com wrote:
 It only needs to be set on your main activity, the one you want the user
 to come back to.

 And it's not finishTaskOnLaunch, it's clearTaskOnLaunch.

 -- Kostya

 2011/1/17 Sergio Luceno slucen...@gmail.com







  Hi!

  I tried to set up the setting finishOnTaskLaunch to true at all my
  activities... but when I click home and then open my app again, it
  didn't start at the main activity, it start at the same activity that
  was running when i clicked the home button...

  On 17 ene, 12:23, Kostya Vasilyev kmans...@gmail.com wrote:
   Sergio,

   To stop the background task - stop the background task.

   It's your own code, so it's under your control. The framework tells you
  when
   things happen via activity state callbacks (onPause / onResume), you just
   need to do the right thing with them.

   For your second issue:

  http://developer.android.com/guide/topics/manifest/activity-element.html

   set clearTaskOnLaunch to true.

   -- Kostya

   2011/1/17 Sergio Luceno slucen...@gmail.com

I wanna do that, because I have a task running on background. And i
wanna stop it when the application is closed. This task is doing http
calls every X minutes to sync the application data over internet.

Also, android OS keep the state of the application and open it at the
last activity where the user was on.

I would like to open the application always by the main activity. also
this main activity is doing a login call, which receive the session id
to make more http calls. I have a risk to loose the session id, while
the user is not using the app and it stills in memory for a long time.

On 17 ene, 11:55, Kumar Bibek coomar@gmail.com wrote:
 Why would you try to do that? The OS would get rid of it whenever it
feels
 necessary. ie, whenever, the device runs low on memory.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Mon, Jan 17, 2011 at 4:22 PM, Sergio Luceno slucen...@gmail.com
wrote:
  Hi all,

  Is there a way to force the application not keep running after
  close
  it?

  When the user closes de applications, it always is running memory.

  Is it possible to define some at the manifest to force the app to
  be
  removed from the memory?

  I was trying to find out some parameter at the manifest... but I
  didn't find nothing

  Thanks in advance

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@googlegroups.comandroid-developers%2Bunsubs
cr...@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.comandroid-developers%2Bunsubs
 cr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@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.comandroid-developers%2Bunsubs 
  cr...@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] ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Sergio Luceno
Hi everybody!

I have a tabhost on my application and I'm using an Activity group
which handles 3 activities inside.

Example:
ActivityGroup Handles
 A - B - C

When i start this activities i'm using the flag
Intent.FLAG_ACTIVITY_CLEAR_TOP.

My problem is when the user goes from A-B-C and press back button,
my B activity shows up, but it does not resume or reload or refresh.
It has the same state as before.

For example if the user goes again to C, C is refreshed, but when from
C goes back B is not.

  On B I have implementend methods such as onResume, onStart,
onReestart and debugging it the main thread never goes in there...

And i need to refresh B because C can make changes that change the
content displayed on B.

I have googleled this for 3 days and I couldn't found a 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: ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Sergio Luceno
m

I had the activity builded with a tabhost, but I wanted to have the
menu buttons at the bottoms always visible. So i started to adapt the
app for using ActivityGroups. Since i started i have been solving
problems...

Maybe you are right, and it's better to not use the activity group.

Let's say i'm not using the activity group, but the application has a
must. The bottom menú has to stay visible always...

What can I do for it?

I was thinking to have a view with the buttons and merge the layout in
every view of the application, to have the look and feel that you're
using activity groups...

Or there is a better solution for this?

On Apr 20, 9:34 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 There are many annoying bugs with ActivityGroups.  Your best bet is to
 bite the bullet and rewrite your app so that it uses a single Activity
 with a TabHost and View's for the pages.

 On Apr 20, 3:05 pm, Sergio Luceno slucen...@gmail.com wrote:







  Hi everybody!

  I have a tabhost on my application and I'm using an Activity group
  which handles 3 activities inside.

  Example:
  ActivityGroup Handles
   A - B - C

  When i start this activities i'm using the flag
  Intent.FLAG_ACTIVITY_CLEAR_TOP.

  My problem is when the user goes from A-B-C and press back button,
  my B activity shows up, but it does not resume or reload or refresh.
  It has the same state as before.

  For example if the user goes again to C, C is refreshed, but when from
  C goes back B is not.

    On B I have implementend methods such as onResume, onStart,
  onReestart and debugging it the main thread never goes in there...

  And i need to refresh B because C can make changes that change the
  content displayed on B.

  I have googleled this for 3 days and I couldn't found a 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: ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Sergio Luceno
Thanks!

I will try it out tomorrow!

On 20 abr, 11:17, Zsolt Vasvari zvasv...@gmail.com wrote:
 A TabHost children are shown/hidden as you flip tabs.  If you are
 building an iPhone clone app with a button bar on the bottom, just
 simply put below the TabHost.

 My layout that uses this pattern looks like this.   I have a TabHost
 and an always visible status bar.

 LinearLayout   android:orientation=vertical

   TabHost android:id=@android:id/tabhost
                          android:layout_width=match_parent
                          android:layout_height=0px
                      android:layout_weight=1

           LinearLayout android:layout_width=match_parent
                                           android:layout_height=match_parent
                                           android:orientation=vertical

          TabWidget android:id=@android:id/tabs
 android:layout_width=match_parent
 android:layout_height=wrap_content/

                 FrameLayout android:id=@android:id/tabcontent
                                                  
 android:layout_width=match_parent
                                                  android:layout_height=0px
                                                  android:layout_weight=1

                         FrameLayout android:id=@+id/page1
                                                          
 android:layout_width=match_parent
                                                          
 android:layout_height=match_parent

                         /FrameLayout

                         FrameLayout android:id=@+id/page2
                                                          
 android:layout_width=match_parent
                                                          
 android:layout_height=match_parent

                         /FrameLayout

                         FrameLayout android:id=@+id/page3
                                                          
 android:layout_width=match_parent
                                                          
 android:layout_height=match_parent

                         /FrameLayout
                 /FrameLayout
            /LinearLayout
      /TabHost

     FrameLayout android:id=@+id/status_bar
         /FrameLayout
 /LinearLayout

 On Apr 20, 4:42 pm, Sergio Luceno slucen...@gmail.com wrote:







  m

  I had the activity builded with a tabhost, but I wanted to have the
  menu buttons at the bottoms always visible. So i started to adapt the
  app for using ActivityGroups. Since i started i have been solving
  problems...

  Maybe you are right, and it's better to not use the activity group.

  Let's say i'm not using the activity group, but the application has a
  must. The bottom menú has to stay visible always...

  What can I do for it?

  I was thinking to have a view with the buttons and merge the layout in
  every view of the application, to have the look and feel that you're
  using activity groups...

  Or there is a better solution for this?

  On Apr 20, 9:34 am, Zsolt Vasvari zvasv...@gmail.com wrote:

   There are many annoying bugs with ActivityGroups.  Your best bet is to
   bite the bullet and rewrite your app so that it uses a single Activity
   with a TabHost and View's for the pages.

   On Apr 20, 3:05 pm, Sergio Luceno slucen...@gmail.com wrote:

Hi everybody!

I have a tabhost on my application and I'm using an Activity group
which handles 3 activities inside.

Example:
ActivityGroup Handles
 A - B - C

When i start this activities i'm using the flag
Intent.FLAG_ACTIVITY_CLEAR_TOP.

My problem is when the user goes from A-B-C and press back button,
my B activity shows up, but it does not resume or reload or refresh.
It has the same state as before.

For example if the user goes again to C, C is refreshed, but when from
C goes back B is not.

  On B I have implementend methods such as onResume, onStart,
onReestart and debugging it the main thread never goes in there...

And i need to refresh B because C can make changes that change the
content displayed on B.

I have googleled this for 3 days and I couldn't found a solution..- 
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: ActivityGroup, when i press back the activity does not reload itself...

2011-04-21 Thread Sergio Luceno
Looking at your code

I can see that you have the tablayout with a tabwidget that has the
buttons

But i can't imagine what is the status bar... do you have also buttons
at your status bar?

And if in your tab nº2, you have more than one activity... the menu
buttons still appearing doing transition from one activity to another?

On 20 abr, 20:16, Sergio Luceno slucen...@gmail.com wrote:
 Thanks!

 I will try it out tomorrow!

 On 20 abr, 11:17, Zsolt Vasvari zvasv...@gmail.com wrote:







  A TabHost children are shown/hidden as you flip tabs.  If you are
  building an iPhone clone app with a button bar on the bottom, just
  simply put below the TabHost.

  My layout that uses this pattern looks like this.   I have a TabHost
  and an always visible status bar.

  LinearLayout   android:orientation=vertical

    TabHost android:id=@android:id/tabhost
                           android:layout_width=match_parent
                           android:layout_height=0px
                       android:layout_weight=1

            LinearLayout android:layout_width=match_parent
                                            
  android:layout_height=match_parent
                                            android:orientation=vertical

           TabWidget android:id=@android:id/tabs
  android:layout_width=match_parent
  android:layout_height=wrap_content/

                  FrameLayout android:id=@android:id/tabcontent
                                                   
  android:layout_width=match_parent
                                                   android:layout_height=0px
                                                   android:layout_weight=1

                          FrameLayout android:id=@+id/page1
                                                           
  android:layout_width=match_parent
                                                           
  android:layout_height=match_parent

                          /FrameLayout

                          FrameLayout android:id=@+id/page2
                                                           
  android:layout_width=match_parent
                                                           
  android:layout_height=match_parent

                          /FrameLayout

                          FrameLayout android:id=@+id/page3
                                                           
  android:layout_width=match_parent
                                                           
  android:layout_height=match_parent

                          /FrameLayout
                  /FrameLayout
             /LinearLayout
       /TabHost

      FrameLayout android:id=@+id/status_bar
          /FrameLayout
  /LinearLayout

  On Apr 20, 4:42 pm, Sergio Luceno slucen...@gmail.com wrote:

   m

   I had the activity builded with a tabhost, but I wanted to have the
   menu buttons at the bottoms always visible. So i started to adapt the
   app for using ActivityGroups. Since i started i have been solving
   problems...

   Maybe you are right, and it's better to not use the activity group.

   Let's say i'm not using the activity group, but the application has a
   must. The bottom menú has to stay visible always...

   What can I do for it?

   I was thinking to have a view with the buttons and merge the layout in
   every view of the application, to have the look and feel that you're
   using activity groups...

   Or there is a better solution for this?

   On Apr 20, 9:34 am, Zsolt Vasvari zvasv...@gmail.com wrote:

There are many annoying bugs with ActivityGroups.  Your best bet is to
bite the bullet and rewrite your app so that it uses a single Activity
with a TabHost and View's for the pages.

On Apr 20, 3:05 pm, Sergio Luceno slucen...@gmail.com wrote:

 Hi everybody!

 I have a tabhost on my application and I'm using an Activity group
 which handles 3 activities inside.

 Example:
 ActivityGroup Handles
  A - B - C

 When i start this activities i'm using the flag
 Intent.FLAG_ACTIVITY_CLEAR_TOP.

 My problem is when the user goes from A-B-C and press back button,
 my B activity shows up, but it does not resume or reload or refresh.
 It has the same state as before.

 For example if the user goes again to C, C is refreshed, but when from
 C goes back B is not.

   On B I have implementend methods such as onResume, onStart,
 onReestart and debugging it the main thread never goes in there...

 And i need to refresh B because C can make changes that change the
 content displayed on B.

 I have googleled this for 3 days and I couldn't found a solution..- 
 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