seekbar

Setting and accessing iOS seek bar on lock screen

♀尐吖头ヾ 提交于 2019-12-09 13:09:03
问题 I am playing a audio file in iOS app using AVQueuePlayer/AVFoundation. i have set the MPNowPlayingInfoCenter's now playing information like album title, artist, Artwork, like this NSMutableDictionary *albumInfo = [[NSMutableDictionary alloc] init]; MPMediaItemArtwork *artworkP; UIImage *artWork = [UIImage imageNamed:album.imageUrl]; [albumInfo setObject:album.title forKey:MPMediaItemPropertyTitle]; [albumInfo setObject:album.auther forKey:MPMediaItemPropertyArtist]; [albumInfo setObject:album

进度条(SeekBar和RatingBar)—Mars Android开发视频之第一季第十八集(重)

∥☆過路亽.° 提交于 2019-12-09 11:49:38
1· SeekBar的主要属性 进度条最大值:max 当前进度:progress 次要进度的值:SecondaryProgress 特点:用户能够来回拖拽。 适用于: 常用在播放器上面,当前进度代表播放进度;次要进度表示缓冲进度。 下面这是一个 最大进度100,当前进度30,次要进度50的SeekBar: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <SeekBar android:id="@+id/seekBar_1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="50dp" android:max="100" android:progress="30" android:secondaryProgress="50"/> </RelativeLayout> 2· SeekBar的监听器 接口

Android seekbar with custom thumb having dynamic text inside it

久未见 提交于 2019-12-09 05:27:56
问题 I want to create android custom SeekBar having thumb with text inside it to show current seek position. Here is my code: SeekBar sb; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.custom_seek_bar_activity); sb = (SeekBar)findViewById(R.id.slider); sb.setMax(100); sb.setProgress(10); BitmapDrawable bd = writeOnDrawable(R.drawable.star2, Double.toString(50)); sb.setThumb(bd); sb.setOnSeekBarChangeListener(new

Cannot drag seekbar inside scrollview

房东的猫 提交于 2019-12-08 19:43:51
问题 I apologize if this question has been answered elsewhere - I couldn't find anyone on SO with the same problem. I added a SeekBar to a RelativeLayout that sits inside a nested ScrollView. However, I am unable to drag the thumb of the seekbar. I can click along its path to change it's value, but I can't drag it. Any help would be appreciated. My XML looks like: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/containerView" android:background="@android

Android 6.0 Marshmallow stops showing Vertical SeekBar thumb

大城市里の小女人 提交于 2019-12-08 19:04:09
问题 I've been using this basic wrapper around a SeekBar but find it hides the thumb, or does something funky like make it white on a white background, under Marshmallow. I used the AS "BlankActivity" wizard to create a project to illustrate this, changing nothing except what is described here, from the defaults. On the left is Lollipop, and the same code is running on the right under Marshmallow: There is a custom horizontal SeekBar to test if there was a general problem customizing them, which

Disabled seekBar without dimming

こ雲淡風輕ζ 提交于 2019-12-08 19:03:15
问题 I need to prevent seekbar from user inputs in special cases. If I use setEnabled(false) it becomes gray instead of white. Is there any method to disable seekbar without dimming or set another drawable for progress in disabled seekbar ? 回答1: I'm not sure why you'd want to change this, and I don't believe it's good practice to override the visual queue for a user that something is disabled. If it looks active, but doesn't interact, I'm going to be mad at your app. Regardless, to answer your

Can't move Android SeekBar with Appium

眉间皱痕 提交于 2019-12-08 17:39:47
问题 I have a customized Android seekbar like this, and the positions where it can move to. And it starts from the middle: I want to move the slider first and then check if it's saved. I have a method which I use TouchAction: public void moveSeekBar(){ WebElement seekBar = appiumDriver.findElementById("com.feverapp:id/SymptomTrackingActivity_var"); //Get start point of seekbar. int startX = seekBar.getLocation().getX(); System.out.println(startX); //Get end point of seekbar. int endX = seekBar

How could you increase the screen brightness in Android using a seek bar?

家住魔仙堡 提交于 2019-12-08 14:19:46
问题 I would like to increase the brightness of the screen using a seek bar within my Android application, but I'm not sure how to do this. How can I add this functionality? 回答1: Using this you can set the screen brightness: WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = 100 / 100.0f; getWindow().setAttributes(lp); Now, as you want to implement progress bar like control, i would suggest you to implement SeekBar, so using this you can easily increase/decrease

Using a SeekBar within a ListView

為{幸葍}努か 提交于 2019-12-08 10:58:10
问题 I have a seekbar in a listview, it is disabled to stop the user from changing the value whilst scrolling the list. I wish to enable it if the list item is long clicked, allow the user to change it and then disable it again. Any suggestions. I seem unable to access the seekbar from the activity as it is setup inside the ArrayAdapter to display a value from the database I am able to fire a both a click event and a long click event for the list item, as the seekbar is currently disabled. 回答1:

Issue using seekbar inside a scroll view

本秂侑毒 提交于 2019-12-08 09:41:35
问题 I have a seek bar inside a scroll view.When some one accidentally touches the slider during scrolling slider changes. I want to change the slider value only when the i drag the thumb. Can anyone help me with this? 回答1: I'm not aware of any builtin option that allow you to do what you're looking for, but you can easily extend the default SeekBar implementation and override the handling of touch events. A basic implementation will look somewhat like this: public class ThumbOnlySeekBar extends