Comments (13)
Now you can try to use compile 'net.qiujuer.genius:ui:1.5.2'
version.
from genius-android.
Thank you feedback. I will check it.
from genius-android.
In my test:
SeekBar seekBar = (SeekBar) findViewById(R.id.seekBar);
seekBar.setMax(3);
seekBar.setMin(1);
// we try change progress to 0 value
seekBar.setProgress(0);
// the progress < min value, so progress auto change to 1 value
findViewById(R.id.opt).setOnClickListener(new View.OnClickListener() {
int optCount = 0;
@Override
public void onClick(View v) {
SeekBar seekBar = (SeekBar) findViewById(R.id.seekBar);
Log.e(MainActivity.this.getClass().getName(),
String.format("Before: progress:%s max:%s min:%s", seekBar.getProgress(), seekBar.getMax(), seekBar.getMin()));
int progress = seekBar.getProgress();
Log.e(MainActivity.this.getClass().getName(),
String.format("Running: try change progress:%s to %s, optCount:%s", progress, ++progress, ++optCount));
seekBar.setProgress(progress);
Log.e(MainActivity.this.getClass().getName(),
String.format("After: progress:%s max:%s min:%s", seekBar.getProgress(), seekBar.getMax(), seekBar.getMin()));
// if onclick count > 10
// we will change the SeekBar max value
if (optCount == 5) {
Log.e(MainActivity.this.getClass().getName(), "Change SeekBar max value to 10.");
seekBar.setMax(10);
// in this, the SeekBar not refresh progress bar
// ....
// if you need refresh the widget, you can call
seekBar.setProgress(seekBar.getProgress());
// or wait me update the SeekBar widget, I fixed quickly
}
}
});
This is bug, I will fix it.
from genius-android.
When will there be an update?
from genius-android.
Now, you can set compile 'net.qiujuer.genius:ui:1.5.1'
to use new version.
from genius-android.
Thanks a lot!!!
from genius-android.
How can I refresh the view the best way?
from genius-android.
In ui:1.5.1
, the view will auto refresh the draw on call setMax()
or setMin()
.
If you only call invalidate()
, the view will refresh draw; but the draw parameters not correct.
The view have some logical operations on call setMax()
or setMin()
.
from genius-android.
It doesnt work for me. I think it has something to do with genius:gAllowTrackClickToDrag="false".
from genius-android.
Here is my code:
<net.qiujuer.genius.ui.widget.SeekBar
android:id="@+id/seekBarSatz"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/custom_margin_left_and_right"
android:layout_marginRight="@dimen/custom_margin_left_and_right"
android:layout_marginEnd="@dimen/custom_margin_left_and_right"
android:layout_marginStart="@dimen/custom_margin_left_and_right"
genius:gAllowTrackClickToDrag="false"
genius:gIndicator="auto"
genius:gIndicatorBackgroundColor="@color/primary_dark"
genius:gIndicatorSeparation="30dp"
genius:gIndicatorTextAppearance="@style/Genius.Widget.BalloonMarker.TextAppearance"
genius:gRippleColor="@color/primary_light"
genius:gScrubberColor="@color/primary_light"
genius:gScrubberStroke="4dp"
genius:gThumbColor="@color/primary_dark"
genius:gThumbSize="6dp"
genius:gTickSize="5dp"
genius:gTouchSize="12dp"
genius:gTrackColor="@color/grey_light"
genius:gTrackStroke="2dp" />
seekBarSatz = (SeekBar) findViewById(R.id.seekBarSatz);
seekBarSatz.setMin(1);
if(parents.get(0).getChildItemList() == null){
seekBarSatz.setMax(1);
}else{
seekBarSatz.setMax(parents.get(0).getChildItemList().size());
}
void next(View v){ //This is called by a button
if(child != null){
seekBarSatz.setMax(parent.getChildItemList().size());
}else{
seekBarSatz.setMax(1);
}}
from genius-android.
Oh, ok I know. I will test it. Thanks.
from genius-android.
Now it works. Thx a lot!
from genius-android.
You’re welcome!
from genius-android.
Related Issues (20)
- how to add proguard-rules.rpo HOT 2
- AS3 下面使用FloatActionButton出现闪退
- 相册点击查看大图崩溃 HOT 1
- sample 的源码不在项目里面吗 HOT 1
- Android 8.0 checkbox 无法点击
- 2.2.0版本无法拉取
- button设置background,直接用色值无效,引用资源文件的没问题
- Loading widget bug
- UI module remove dependency res module HOT 1
- 期待Button的背景动画和onClick能同时执行 HOT 1
- 为什么项目整个clone下来,不能直接运行?哪个是主Module呢? HOT 2
- gAllowTrackClickToDrag=true not working in ScrollView HOT 1
- clone下来 import 工程之后报错Error:No service of type Factory available in ProjectScopeServices. HOT 1
- Use style background resource invalid HOT 1
- Whether it can be compatible with the low version HOT 1
- OOM Error HOT 3
- 你他妈不要乱改原先的ui定义行不行? HOT 1
- Vertical seek bar HOT 3
- 高斯模糊 HOT 1
- 图片模糊的可以采用OpenGl方法实现吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genius-android.