Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

展示控件的时候,不支持默认值 #148

Open
SixGL opened this issue Jun 21, 2019 · 4 comments
Open

展示控件的时候,不支持默认值 #148

SixGL opened this issue Jun 21, 2019 · 4 comments

Comments

@SixGL
Copy link

SixGL commented Jun 21, 2019

No description provided.

@lrchao
Copy link

lrchao commented Jun 26, 2019

version 1.1.2 is work~

@zff0123
Copy link

zff0123 commented Oct 29, 2019

xml 中设置默认值时有效的 如:aigestudio:wheel_selected_item_position="8"
但是在onCreate代码中设置无效,如
public class TimerPickActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_time_picker);
    
    final WheelPicker minuteWp = findViewById(R.id.wp_time_picker);
    minuteWp.setSelectedItemPosition(5);
}

}

@hanswimtj
Copy link

我也遇到这个问题了。1.1.2版本没有这个问题,但是1.1.2滚轮滚动过程中按下滚轮会导致getCurrentItemPosition()返回值不对。

@hanswimtj
Copy link

对比了一下源代码,有一种解决办法:
picker.setSelectedItemPosition(index, false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants