Re: [android-developers] Seekbar Save state and restore

2013-07-14 Thread Keith Zettler
So we come full circle . How exactly can i save/restore this seekbar if 
user uses back button or activity is destroyed. Does anyone have a seekbar 
specific example ?

On Saturday, July 13, 2013 12:32:01 AM UTC-4, TreKing wrote:


 On Fri, Jul 12, 2013 at 7:07 PM, Keith Zettler 
 leftc...@gmail.comjavascript:
  wrote:

 This activity is called via intent from the first activity. If i back 
 button from this activity to the first activity the seekbar value returns 
 to zero when i get back.



 http://developer.android.com/training/basics/activity-lifecycle/recreating.html


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




Re: [android-developers] Seekbar Save state and restore

2013-07-14 Thread Fred Niggle
I think you mean save the position of the seekbar (eg users preference)
then you can use shared prefs .
this thus:
onCreate reads the shared prefs and sets the value of the seekbar
your 'save' function then writes the value to shared prefs.



On 14 July 2013 17:34, Keith Zettler leftcont...@gmail.com wrote:

 So we come full circle . How exactly can i save/restore this seekbar if
 user uses back button or activity is destroyed. Does anyone have a seekbar
 specific example ?

 On Saturday, July 13, 2013 12:32:01 AM UTC-4, TreKing wrote:


 On Fri, Jul 12, 2013 at 7:07 PM, Keith Zettler leftc...@gmail.comwrote:

 This activity is called via intent from the first activity. If i back
 button from this activity to the first activity the seekbar value returns
 to zero when i get back.


 http://developer.android.com/**training/basics/activity-**
 lifecycle/recreating.htmlhttp://developer.android.com/training/basics/activity-lifecycle/recreating.html

 --**--**
 --**---
 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 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.






-- 
Sent from an Ubuntu Desktop.

Ubuntu Speech 
inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
now available on Google Play, along with Magnetic
Door Alarm 
apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
.

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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.




Re: [android-developers] Seekbar Save state and restore

2013-07-14 Thread TreKing
On Sun, Jul 14, 2013 at 11:34 AM, Keith Zettler leftcont...@gmail.comwrote:

 So we come full circle . How exactly can i save/restore this seekbar if
 user uses back button or activity is destroyed. Does anyone have a seekbar
 specific example ?


First, did you read the link I provided?

Second, I assume you don't want to save the actual Seekbar, because that
does not make sense. So what exactly is it about the Seekbar that you're
trying to save?

Third, you don't need a seekbar specific example because there's nothing
special about a Seekbar when it comes to saving and restoring state.


On Sun, Jul 14, 2013 at 12:42 PM, Fred Niggle fred.nig...@googlemail.comwrote:

 I think you mean save the position of the seekbar (eg users preference)
 then you can use shared prefs .
 this thus:
 onCreate reads the shared prefs and sets the value of the seekbar
 your 'save' function then writes the value to shared prefs.


If this is what the OP was referring to, then this will work just fine. If
he just needs to keep the current value of the seekbar in tact during the
current session and it is not a user preference that should persist, then
this is not the technically correct way to go about it, though it would
work.

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




Re: [android-developers] Seekbar Save state and restore

2013-07-12 Thread Keith Zettler
This activity is called via intent from the first activity. If i back 
button from this activity to the first activity the seekbar value returns 
to zero when i get back.

On Friday, July 12, 2013 12:39:02 AM UTC-4, TreKing wrote:


 On Thu, Jul 11, 2013 at 9:14 PM, Keith Zettler 
 leftc...@gmail.comjavascript:
  wrote:

 How exactly can i save/restore this seekbar if user uses back button or 
 activity is destyroyed?


 1 - Your code shows two seekbars so referring to this seekbar is 
 ambiguous.
 2 - A seekbar, being a built-in widget, should save and restore itself.
 3 - Your code does not demonstrate anything that needs saving.



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




Re: [android-developers] Seekbar Save state and restore

2013-07-12 Thread TreKing
On Fri, Jul 12, 2013 at 7:07 PM, Keith Zettler leftcont...@gmail.comwrote:

 This activity is called via intent from the first activity. If i back
 button from this activity to the first activity the seekbar value returns
 to zero when i get back.


http://developer.android.com/training/basics/activity-lifecycle/recreating.html

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




Re: [android-developers] Seekbar Save state and restore

2013-07-11 Thread TreKing
On Thu, Jul 11, 2013 at 9:14 PM, Keith Zettler leftcont...@gmail.comwrote:

 How exactly can i save/restore this seekbar if user uses back button or
 activity is destyroyed?


1 - Your code shows two seekbars so referring to this seekbar is
ambiguous.
2 - A seekbar, being a built-in widget, should save and restore itself.
3 - Your code does not demonstrate anything that needs saving.


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