Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

buildscript {
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
Expand All @@ -20,10 +17,7 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void onClick(View view) {
//如果只是要显示在屏幕的下方
//decorView是activity的根View,包含 contentView 和 titleView
if (mPickerOptions.decorView == null) {
mPickerOptions.decorView = (ViewGroup) ((Activity) context).getWindow().getDecorView();
mPickerOptions.decorView = (ViewGroup) ((Activity) context).getWindow().getDecorView().findViewById(android.R.id.content);
}
//将控件添加到decorView中
rootView = (ViewGroup) layoutInflater.inflate(R.layout.layout_basepickerview, mPickerOptions.decorView, false);
Expand Down