seekbar

Drop down seekbar in Android actionbar?

为君一笑 提交于 2019-12-14 02:00:11
问题 I'm trying to put a dropdown/pulldown seekbar in the actionbar. I thought something like this in OnCreateOptionsMenu() would work: SubMenu subMenu = menu.addSubMenu("DropTest"); MenuItem seekBarDrop = subMenu2.add("SeekBar"); SeekBar seekBar = new SeekBar(this); seekBarDrop.setActionView(seekBar); seekBarDrop.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); MenuItem subMenuItem = subMenu2.getItem(); subMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); But it fails miserably. I've also

setProgressDrawable fills the entire seekBar

你。 提交于 2019-12-14 00:50:34
问题 As I say in the title, when I use setProgressDrawable, it fills the entire SeekBar: if progress is at 34%, progress show 100% but thumb shows the correct percentatge 34%. I don't figure out what can be the problem... done.setProgressDrawable(getResources().getDrawable(R.drawable.seekbar_progress)); done.setThumb(getResources().getDrawable(R.drawable.seekbar_thumb)); seekbar_progress.xml <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android

Change CONTROL_AE_EXPOSURE_COMPENSATION propostional to seekbar progress in Camera2 API

 ̄綄美尐妖づ 提交于 2019-12-13 14:23:05
问题 I'm currently working on Androids Camera 2 API and my current problem is, that I cannot set the CONTROL_AE_EXPOSURE_COMPENSATION . I want to exposure between -2 to 2 . Here is my code. public void setExposure(double exposureAdjustment) { Range<Integer> range1 = mCameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_RANGE); int minExposure = range1.getLower(); int maxExposure = range1.getUpper(); float newCalculatedValue = 0; if (exposureAdjustment >= 0) { newCalculatedValue

Reverse seekbar (Right to left) colour

拈花ヽ惹草 提交于 2019-12-13 13:30:31
问题 I've been trying to implement a seek bar similar to the ones you use to accept or decline a call. For call accept I set sbLeft.setProgress(0) and for call decline I set sbRight.setProgress(15), with setMax=15 bot both seek bars. This gives me half of the desired result. The problem I face is with the colours. As I drag the left seekbar to accept a call I need a green colour that covers the dragged part. For that I use the following code (giving me the desired result): <layer-list xmlns

How to play a video using videoview controlled by a seekBar or Progress bar?

安稳与你 提交于 2019-12-13 05:29:48
问题 After searching for many hours , i am asking this, any related answers are welcomed . . I'm having a video in my R.raw folder and i am playing it in two videoview of same duration simultaneously , here is my code , sb = (SeekBar)findViewById(R.id.control_seekbar); mVideoView1 = (VideoView) findViewById(R.id.surface_view1); mVideoView1.setVideoPath("android.resource://" + getPackageName() +"/"+R.raw.play1); mVideoView1.start(); mVideoView2 = (VideoView) findViewById(R.id.surface_view2);

Get onscreen position of current seekbar progress/secondary progress?

淺唱寂寞╮ 提交于 2019-12-13 05:26:46
问题 I'm trying to customize the look of a seekbar by overriding the onDraw() method - I need to find the current progress/secondary progress position on screen. I know how to get the current progress/secondary progress with getProgress() and getSecondaryProgress() but this does not reflect the position onscreen. I thought I could get the progress drawable and get the bounds of the drawable, or the level of the clipDrawable used for the progress like so: Drawable progress = getProgressDrawable();

Update SeekBar with EditText

半世苍凉 提交于 2019-12-13 04:01:58
问题 i'm developing an BMI calculator and i added an optional SeekBar to change the values from the edittext. When i move the seekbar the values from the edittext are different, but the seekbar doesn't update when i change the from the edittext. Could osmeone explcain how can i do that? I'm having problems with getText and SetProgress public class MainActivity extends Activity { private RadioGroup rgsexo; EditText editPeso; EditText editAltura; TextView imcView; SeekBar alterarAltura; SeekBar

Android thumb is not centered in seekbar?

淺唱寂寞╮ 提交于 2019-12-12 21:46:47
问题 I've been searching any solution for hours, but couldn't find one. So here's my problem, as i've seen it's really common problem: Thumb in seekbar, is not getting centered... I've made this custom seekbar by 9patch. It's been said that i'm supposed to set its minHeight and maxHeight to same size in many responses in stackoverflow. But even though i set them, it still shows up like this... It is really disturbing, is there any way to work around this? And here is xml: <SeekBar android:id="@+id

ListView recycling switches seekbar position

*爱你&永不变心* 提交于 2019-12-12 18:17:54
问题 I have a strange problem. I have a custom ListView with BaseAdapter . In my ListView row layout, I have few TextView s, Buttons , and a SeekBar . Everything works great, no problems with anything except with recycling. What happens: All SeekBar 's are hidden, except one which is visible. The SeekBar is visible when MediaPlayer on row is playing. That part is working great too. But, when user scrolls up or down, and the row with visible SeekBar is out of view, it recycles, and SeekBar is

Getting value from custom SeekBarPreference

你。 提交于 2019-12-12 18:12:09
问题 I found this code on internet and thought I would give it a try. I put it in my preferences and it was exaclt the way I wanted it to be but my only problem is that I cant get the value of SeekBar. Here is the link to code that I am using in my preference: http://android.hlidskialf.com/blog/code/android-seekbar-preference and here is the part of preference xml: <com.mypack.SeekBarPreference android:key="zoom" android:title="Zoom" android:summary="" android:dialogMessage="Zoom level" android