Re: [android-developers] Seekbar Save state and restore
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
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
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
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
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.
[android-developers] Seekbar Save state and restore
How exactly can i save/restore this seekbar if user uses back button or activity is destyroyed? I have not been able to find a specific example anywhere public class MainActivity extends Activity implements SeekBar.OnSeekBarChangeListener { SeekBar seekBar; SeekBar seekBar1; TextView textView; TextView textView1; TextView textView2; TextView textView3; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); seekBar=(SeekBar)findViewById(R.id.seekbar); seekBar1=(SeekBar)findViewById(R.id.seekBar1); textView=(TextView)findViewById(R.id.textview); textView1=(TextView)findViewById(R.id.textView1); textView2=(TextView)findViewById(R.id.textView2); textView3=(TextView)findViewById(R.id.textView3); seekBar.setOnSeekBarChangeListener(this); } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // Notify that the progress level has changed. int A= (progress+250); textView.setText(SeekBar now at the value of:+progress); textView1.setText(SeekBar now at the value of:+A); } @Override public void onStartTrackingTouch(SeekBar seekBar) { // Notify that the user has started a touch gesture. //textView.setText(textView.getText()+\n+SeekBar Touch Started); } @Override public void onStopTrackingTouch(SeekBar seekBar) { // Notify that the user has finished a touch gesture. // textView.setText(textView.getText()+\n+SeekBar Touch Stopped); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return 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 --- 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
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.
[android-developers] SeekBar thumb colour problem when added through a handler
Hi, I have added a (default) seekbar dynamically to a linear layout in a handler class. The white colour of the thumb is not showing up. Could somebody let me know what is the problem? Thank you, B.Arunkumar -- 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] seekbar to be more accurate
I'm using a seekbar to display and reposition at a frame in a video, using: private class frameChanger implements OnSeekBarChangeListener { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser isVideo) { Log.e(Frame Changer,Progress + progress); video.seekTo(progress); video.requestFocus(); video.invalidate(); } } I can move the seek bar just a tiny tiny amount and the value in the log.e output changes by say 12 - 20 But the video does not change at all However I can move the bar 1/2 inch which has resulted in a value change of 300 - 500 and then the video changes. By video changes I'm meaning the displayed frame of the video. Obviously because the value jumped is so high the number of frames skipped is huge. and very noticable. If there anyway to update the the display and just move the one or two frames when the values changes small amounts, and NOT just move when the value change is large ? 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] Seekbar button separating from slider
Hi everyone - I'm using the seekbar for the first time within a RelativeLayout. When I try to reposition the bar using LayoutParams and setPadding the bar does move as expected but I also see the button moving apart from the progress slider. I'm unclear what is going on. Has anyone else seen this? Also I need a vertical seekbar. setRotation(90) seems to work but it is very hard to get the slider to move. Again I did not see any obvious way of creating a vertical seekbar. Any suggestions/insights would be welcome. -- 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] SeekBar
Not sure if this is an Android 3.2 thing or because I am building the layout pro grammatically But I have a SeekBar and the bar appears as a line with a green circle NOT the standard rectangle with orange fill with rectangle slider. Also What do you use to create a slider button ON -- OFF ? 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
Re: [android-developers] SeekBar
On Sun, Nov 13, 2011 at 10:13 AM, New Developer secur...@isscp.com wrote: Not sure if this is an Android 3.2 thing or because I am building the layout pro grammatically But I have a SeekBar and the bar appears as a line with a green circle NOT the standard rectangle with orange fill with rectangle slider. Correct. They changed the styling of SeekBar with Android 3.x, just as they changed the styling of Spinner and other widgets, as part of the holographic theme. Also What do you use to create a slider button ON -- OFF ? On Android 4.0, use Switch. Once the source code for that is released, it may be possible to package up a version of Switch that can be used on older versions of Android via a JAR. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.2 Programming 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] SeekBar
On 11/13/2011 10:17 AM, Mark Murphy wrote: On Sun, Nov 13, 2011 at 10:13 AM, New Developersecur...@isscp.com wrote: Not sure if this is an Android 3.2 thing or because I am building the layout pro grammatically But I have a SeekBar and the bar appears as a line with a green circle NOT the standard rectangle with orange fill with rectangle slider. Correct. They changed the styling of SeekBar with Android 3.x, just as they changed the styling of Spinner and other widgets, as part of the holographic theme. Also What do you use to create a slider button ON-- OFF ? On Android 4.0, use Switch. Once the source code for that is released, it may be possible to package up a version of Switch that can be used on older versions of Android via a JAR. Thanks anyway to change the styling back to the older version ? -- 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] SeekBar
On Sun, Nov 13, 2011 at 3:56 PM, New Developer secur...@isscp.com wrote: Thanks anyway to change the styling back to the older version ? Possibly, though I haven't looked to see how. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 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] SeekBar jumps ahead initially while playing short media files
Hi All, I am implementing a media player with seekbar controls. I am using AsyncTask to update the seekbar progress. I am facing one issue with seekbar when media player plays short media files( 15 sec duration). The issue is that seekbar suddenly jumps to around 2 seconds forward at the start and then it is normal after this jump. I mean, the seekbar does not start at the far left. Instead, it seems to jump ahead initially. Below is the Asynctask code for this @Override protected String doInBackground(Context... params) { while (mCurrentPosition mTotalDuration) { try { mCurrentPosition = mPlayer.getCurPosition(); if (mCurrentPosition 0) { this.publishProgress(mTotalDuration); } else { this.publishProgress(mCurrentPosition); } Thread.sleep(20); } catch (InterruptedException e) { return null; } catch (Exception e) { return null; } if (this.isCancelled()) { return null; } } @Override protected void onProgressUpdate(Integer... progress) { mSeekbar.setProgress(progress[0]); mDurationView.setText(ConvertToTimeString(progress[0])); } /// Could anybody give some pointers to resolve this issue. Thanks, Ganesh -- 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] seekbar thumb touch area more larger
Hi, guys. thumb image of seekbar small touch of the thumb image is hard to come thumb image was made transparent the background of the large Pressing a transparent background seekbar Do I get the event? I got no events ... Give me a hand? -- 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] Seekbar: Adjust thumb position
Hi, i just created a custom seekbar (seekbar_custom.xml ) and add a thumb (thumb_custom). SeekBar android:id=@+id/seekBar_top android:thumb=@drawable/thumb_custom android:progressDrawable=@drawable/seekbar_custom android:layout_width=435px android:layout_height=100px android:layout_marginLeft=250px android:layout_marginTop=50px /SeekBar As the result i get this: http://s7.directupload.net/file/d/2591/gyykdon3_png.htm As you can see the position of the thumb is not correctly! How can i lower the thumb position or how can i change the position of the thumb in general? I hope you can help me. Thanks Ceat -- 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] SeekBar bug? Calling setThumb(drawable) makes thumb disappear
I'm using a custom image for the Thumb on my SeekBar. I want to change the image at some points in my app, but whenever setThumb(drawable) is called, the Thumb image disappears. The seekbar still works, but it's like the Thumb is invisible. I've found a few other questions regarding this, but no answers, and there is no Issue being tracked that I could find. Does anyone know what I'm doing wrong, or how to work around this? Any Googlers that are familiar with SeekBar? Thanks, Blake -- 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] SeekBar bug? Calling setThumb(drawable) makes thumb disappear
You probably need to call setBounds() on the drawable to give it a size? On Wed, Jun 15, 2011 at 6:03 AM, Blake B. bbuckle...@yahoo.com wrote: I'm using a custom image for the Thumb on my SeekBar. I want to change the image at some points in my app, but whenever setThumb(drawable) is called, the Thumb image disappears. The seekbar still works, but it's like the Thumb is invisible. I've found a few other questions regarding this, but no answers, and there is no Issue being tracked that I could find. Does anyone know what I'm doing wrong, or how to work around this? Any Googlers that are familiar with SeekBar? Thanks, Blake -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer 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] SeekBar problem
Hello list.I would like to know why this code don't work: seekTime.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { public void onStopTrackingTouch(SeekBar seekBar) { seekBar.setMax(seekBar.getProgress() * 2); } [...] I'm sure that the function get called because i tried to set a breakpoint. After the execution the mMax member value is correctly changed, the mProgress don't change, but the graphical bar don't move as it should to reflect the new value (it should go to the center). I tried to add a seekBar.invalidate(); but it don't help.. Roberto Previdi -- 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] SeekBar and setThumb
Could someone explain how must be used the setThumb method? If setThumb(drawable) is called, thumb disappears at all. -- 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] seekbar
how to set circular thum to seekbar -- 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] SeekBar Increment Value
I have a SeekBar and I want the SeekBar to increment by for example 5 each time somebody drags it. The default increment is 1. How can I make it increment by more than 1? Is there a simple method? -- 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] SeekBar Increment Value
On Wed, Aug 11, 2010 at 2:13 PM, Mark Siano siano.m...@gmail.com wrote: I have a SeekBar and I want the SeekBar to increment by for example 5 each time somebody drags it. The default increment is 1. How can I make it increment by more than 1? Is there a simple method? Multiply the result (e.g., getProgress()) by 5. http://stackoverflow.com/questions/3382603/android-seekbar-increment-value-how-to -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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] seekbar half clickable
you can try tapping in to onclicklistener and dispatchtouchevents.. based on coordinated event.getx and gety you can make some decisions. On Tue, Mar 2, 2010 at 2:55 AM, manigault manig...@gmail.com wrote: Hi all i have seekbar wich is for example 100dp height. How can i make only the top 50dp to be clickable and the down 50dp just to be covered with the progress. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] SeekBar
Has anybody tried to use the SeekBar in the window's title bar, instead of the ProgressBar, using the requestWindowFeature (Window.FEATURE_PROGRESS);? -- 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] SeekBar
Business Talk wrote: Has anybody tried to use the SeekBar in the window's title bar, instead of the ProgressBar, using the requestWindowFeature (Window.FEATURE_PROGRESS);? I do not believe that is possible. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 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] SeekBar with Text?
hello, is there a xml attribute to define text below the seekbar for the values? or must i set TextViews below the seekbar? Or is there a other similar widget for that problem?? I want to change km/h values with the seekbar. and the user wants to see, which value they set. Thanks, Stefan -- 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] SeekBar bug or intended?
I made a SeekBar like below. SeekBar android:id=@+id/SeekBar011 android:layout_width=200px android:layout_height=80px android:progressDrawable=@drawable/ progress_horizontal2 android:thumb=@drawable/seek_thumb2 / All images in progress_horizontal2.xml seek_thumb2.xml have 64px height. I expected that progressBar thumbs are nicely vertically centered at (80-64)/2 px y-pos. (I put 80px at layout_height is for wider touch area) But what I saw is the progressbar a few pixel below the thumb. I looked into the AbsSeekBar.java and found that the default maxHeight value is 48px(why?) so progressbar moved down (64-48)/2 px in onSizeChanged(). I was surprised that the default maxHeight value is not Math.max (progressbar's height, thumb's height). Is there any reason for this or just a bug? -- 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] seekbar / progressbar
i want to change the color of progressbar as the cursor is moved, but setProgressDrawable() seems to work only within OnCreate() method, if i change the ProgressDrawable inside onProgressChanged method inspecting mSeekBar i can see that the value of Currentdrawable and ProgressDrawable is updated but the progressbar disappear and it reappears only when the progressdrawable changes back to the old value (the one set in the onCreate method) public void onProgressChanged(SeekBar seekBar, int progress,boolean fromTouch) { seekBar.setProgressDrawable(new_drawable); } Full code: public class SeekBar2 extends Activity implements SeekBar.OnSeekBarChangeListener { SeekBar mSeekBar; TextView mProgressText; TextView mTrackingText; static LayerDrawable mdrawable_green; static LayerDrawable mdrawable_blue; static LayerDrawable mdrawable_red; enum BarColor { RED, BLUE, GREEN; LayerDrawable getDrawable(){ switch(this){ case RED: return mdrawable_red; case BLUE: return mdrawable_blue; case GREEN: return mdrawable_green; default : return mdrawable_red; } } }; BarColor mcolor; public BarColor getColor() { return mcolor; } public void setColor(SeekBar seekbar,BarColor color) { this.mcolor = color; seekbar.setProgressDrawable(color.getDrawable()); } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mSeekBar = (SeekBar) findViewById(R.id.seek); mdrawable_green = (LayerDrawable) this.getResources().getDrawable (R.drawable.pgreen); mdrawable_blue = (LayerDrawable)this.getResources().getDrawable (R.drawable.pblue); mdrawable_red = (LayerDrawable)this.getResources().getDrawable (R.drawable.pred); setColor(mSeekBar ,BarColor.RED); mSeekBar.setOnSeekBarChangeListener(this); mProgressText = (TextView) findViewById(R.id.progress); mTrackingText = (TextView) findViewById(R.id.tracking); } public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { mProgressText.setText(progress + + seekbar_from_touch + = + fromTouch); BarColor color; if(progress 33) color = BarColor.RED; else if ((progress=33) (progress66)) color = BarColor.BLUE; else color = BarColor.GREEN; if(color!=mcolor) setColor(seekBar,color); } public void onStartTrackingTouch(SeekBar seekBar) { mTrackingText.setText(seekbar_tracking_on); } public void onStopTrackingTouch(SeekBar seekBar) { mTrackingText.setText(seekbar_tracking_off); } } main.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent SeekBarandroid:id=@+id/seek android:layout_width=fill_parent android:layout_height=wrap_content android:max=100 android:progress=0 android:secondaryProgress=0 / TextView android:id=@+id/progress android:layout_width=fill_parent android:layout_height=wrap_content / TextView android:id=@+id/tracking android:layout_width=fill_parent android:layout_height=wrap_content / /LinearLayout pblue.xml(pred.xml and pgreen.xml are different only for the progress layer): ?xml version=1.0 encoding=utf-8? layer-list xmlns:android=http://schemas.android.com/apk/res/ android item android:id=@android:id/background shape corners android:radius=5dip / gradient android:startColor=#ff9d9e9d android:centerColor=#ff5a5d5a android:centerY=0.75 android:endColor=#ff747674 android:angle=270 / /shape /item item android:id=@android:id/secondaryProgress clip shape corners android:radius=5dip / gradient android:startColor=#80ffd300
[android-developers] SeekBar
Hi, How to set the thumb position when progress has changed. -- Thank Regards Peeyush Varshney --~--~-~--~~~---~--~~ 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] Seekbar thumb animation
Hi, As the seekbar thumb is a drawable so its support for animation seems limited. It may not be feasible but I would like to hear feedback from those who have more experience w/ UI. Animations I have in mind are quite simple like a few blinks when layout becomes visible. With Views, blinks can be easily implemented with alpha cycles but not so for Drawables. I explored several ideas but none seems to work well: * Using AnimationDrawable does not seem to help as it requires an ImageView host. * My main activity has an animation on its layout. I tried to set the thumb drawable to another bitmap onAnimationEnd when the main layout is complete. The old drawable went away but the new one did not show so the thumb disappeared. I checked the thumboffset to make sure it was not out of range. * Set a Drawable callback on the drawable but that also requires a view. Another way is to have a custom seekbar with a View for thumb instead of Drawable. Please let me know if I have overlooked any other options currently supported by SDK ? Thanks in advance. - az9702 --~--~-~--~~~---~--~~ 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] Seekbar - Snap to value
Hey, Quick question... Is there a way to define set values (i.e. 0%, 25%, 50%, 75%, 100%) for the seekbar widget that enables the slider to snap to the nearest set value? For example instead of allowing the user to position the slider at an percentage through 0-100, instead the slider can only ever be positioned at one of the five set values? Oh and while were on the subject is there an easy solution for positioning the seekbar vertically, i'd rather not hack through the seekbar source code - but I fear I may have to! Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SeekBar
Hello , everybody! I want to make my own Seek Bar. When I try to override onProgressRefresh method, Eclipse give me an error: the method onProgressRefresh is undefined for the type SeekBar. I cheked listing SeekBar.java and this method is in. Any ideas why this happend? 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] SeekBar does not reach the end
Hello, I have an options panel that allows setting of keyboard sensivity. I use SeekBar to get the sensivity but it never reaches the max end. There is the code: final SeekBar seekBarKeyboardSens = (SeekBar)findViewById (R.id.SeekBarKeyboardSens); seekBarKeyboardSens.setMax(10); seekBarKeyboardSens.setProgress(keyboardSensivity); seekBarKeyboardSens.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) { keyboardSensivity = arg1; } // other overrides }); Max value I got is 8... Has anyone solved that problem? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---