seekbar

SeekBar in a ListActivity using an ArrayAdapter

半腔热情 提交于 2019-12-08 09:06:56
问题 I'm not tied to using an ArrayAdapter but, what I want is a list where each item contains an ImageView, a TextView, and a SeekBar to where I can update the images/texts as well as receive callbacks from each slider (obviously, I need to be able to add and delete rows dynamically). I've no trouble creating a list that contains these items that is static -> i.e. defined in an xml layout for each row of my list. However, with this, I'm unable to "overwrite the 'onStartTrackingTouch()',

Audio seekBar Thread Problem?

♀尐吖头ヾ 提交于 2019-12-08 05:45:23
问题 Originally, I had a MediaPlayer mPlayers to play/pause/stop my Audio file. Now, I'm trying to add a seek bar for my media. I tried using Threads and this is what I came up with: In onCreate() : seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // TODO Auto-generated method stub mPlayer.seekTo(progress); } ////........Omitted Code..........\\\\ //At the very end of the method:

User can not interact with the Seekbar

元气小坏坏 提交于 2019-12-08 04:43:31
问题 I have one seekbar in my custom listview . Now i dont want that user change the seekbar progress manually. so what i have to do ? how to remove the ability for a user to interact with the SeekBar... 回答1: Try disabling the Seekbar with setEnabled(false) right after you have set the value you want to the SeekBar 回答2: ccheneson's solution works, but it also changes the color of the seekbar. if you want to leave your current bright green with the seekbar, use the following code (also found here

Refresh seekbar + textview in a listview

天涯浪子 提交于 2019-12-08 04:11:15
问题 I have a list view where each textview is supposed to show the value of the seekbar. I have got it working such that once the onStopTrackingTouch is called for a seekbar I update the corresponding textview. I would like for the change to occur as the user is moving the seekbar but I am having trouble doing the same as the listview doesn't refresh that often. What would be an ideal method to achieve this? 回答1: You can call notifyDataSetChanged on OnSeekBarChangeListener Hope this help. 回答2: So

How to design custom seekbar and volume control for ExoPlayer in Android

北战南征 提交于 2019-12-08 02:11:51
问题 I have tried this and this for Design Custom Seekbar for ExoPlayer but no luck. I want to design custom thumb and ProgressBar for ExoPlayer. Following is the XML for ExoPlayer where I've tried to put seekbar but it's not coming as expected. <com.google.android.exoplayer.AspectRatioFrameLayout android:id="@+id/video_frame" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center"> <SurfaceView android:id="@+id/surface_view" android:layout_width=

SeekBar drawable not drawn after being reused by Adapter

核能气质少年 提交于 2019-12-08 02:03:56
问题 I need to paint an overlay image onto a SeekBar in my ListView rows. This isn't too hard to do and the code in this question accomplishes that by painting the row number in a bitmap and placing it as the progress drawable. The problem that I am having is that this only works one time. When the view is recycled to be used for another row, the drawable disappears. The first 10 views (positions 0 through 9) worked. Everything after that fails. There is no error or exception. Android just stops

Android SeekBar custom rectangle thumb visual bug

别等时光非礼了梦想. 提交于 2019-12-08 01:16:27
问题 I try to set custom rectangle thumb with drawable timeline_runner.png SeekBar in my activity.xml: <SeekBar android:id="@+id/seekBar" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxHeight="10dp" android:minHeight="10dp" android:progressDrawable="@drawable/seek_bar_video" android:thumb="@drawable/timeline_runner" android:thumbOffset="0dp" android:padding="0dp" android:layout_weight="1" android:layout_marginLeft="17dp" android:layout_marginRight="12dp"/> seek

Make seekbar thumb hitbox bigger

大兔子大兔子 提交于 2019-12-08 01:15:44
问题 I made a customised seekbar that looks like this the thing is that it is pretty hard to grab the slider. so what i wanted to to is to increase the hitbox of the thumb to make it easier. i tried a few things, but always messed up the seekbar look. any ideas how i could do that? layout.xml <SeekBar android:id="@+id/xxx" style="@style/SeekBar" android:layout_width="@dimen/pixel_130dp" android:layout_below="@+id/name_textview" android:layout_centerHorizontal="true" /> styles.xml <style name=

Seekbar in Options Menu

♀尐吖头ヾ 提交于 2019-12-07 20:23:44
问题 I'm trying to add a seekbar item to my options menu, but all I get is a panel with my title for the text. In my main activity I'm doing this: @Override public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.activity_main, menu); return true; } And here is my activity_main.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/transparency_seekbar" android:showAsAction="never" android:title="test" android:actionViewClass=

Android seekbar with custom thumb

一曲冷凌霜 提交于 2019-12-07 16:28:56
问题 I want to create a seekbar like in this image: seekbar http://i47.tinypic.com/k2k54z.jpg The question is, how to place thumb above the progress line? This line android:thumb="@drawable/thumb" places the thumb in the center of the line. Any suggestions? 回答1: you can assume the whole bar and the above thumb as one seekbar what you have to do is just include the blank area above the bar in progress and background image and include the blank area below the thumb in the image for thumb. 回答2: I am