Skip to content

Commit 0b4279f

Browse files
committed
修改gradle版本
暴露一些控件api
1 parent 818686a commit 0b4279f

File tree

12 files changed

+54
-33
lines changed

12 files changed

+54
-33
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4+
namespace 'com.bigkoo.pickerviewdemo'
45
compileSdkVersion 26
56

67
defaultConfig {

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.bigkoo.pickerviewdemo">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

app/src/main/java/com/bigkoo/pickerviewdemo/JsonDataActivity.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,14 @@ private void initView() {
8484

8585
@Override
8686
public void onClick(View v) {
87-
switch (v.getId()) {
88-
case R.id.btn_data:
89-
mHandler.sendEmptyMessage(MSG_LOAD_DATA);
90-
break;
91-
case R.id.btn_show:
92-
if (isLoaded) {
93-
showPickerView();
94-
} else {
95-
Toast.makeText(JsonDataActivity.this, "Please waiting until the data is parsed", Toast.LENGTH_SHORT).show();
96-
}
97-
break;
87+
if (v.getId() == R.id.btn_data) {
88+
mHandler.sendEmptyMessage(MSG_LOAD_DATA);
89+
} else if (v.getId() == R.id.btn_show) {
90+
if (isLoaded) {
91+
showPickerView();
92+
} else {
93+
Toast.makeText(JsonDataActivity.this, "Please waiting until the data is parsed", Toast.LENGTH_SHORT).show();
94+
}
9895
}
9996
}
10097

build.gradle

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@
22

33
buildscript {
44
repositories {
5-
maven {
6-
url 'http://maven.aliyun.com/nexus/content/groups/public/'
7-
}
5+
maven { url 'https://maven.aliyun.com/repository/public/' }
6+
maven { url 'https://maven.aliyun.com/repository/google/' }
87
google()
9-
jcenter()
8+
mavenCentral()
109
}
1110
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.5.1'
11+
classpath 'com.android.tools.build:gradle:8.2.0'
1312
// classpath "com.novoda:bintray-release:0.9.1"
14-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
13+
// classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
1514
// NOTE: Do not place your application dependencies here; they belong
1615
// in the individual module build.gradle files
1716
}
1817
}
1918

2019
allprojects {
2120
repositories {
22-
maven {
23-
url 'http://maven.aliyun.com/nexus/content/groups/public/'
24-
}
21+
maven { url 'https://maven.aliyun.com/repository/public/' }
22+
maven { url 'https://maven.aliyun.com/repository/google/' }
2523
google()
26-
jcenter()
24+
mavenCentral()
2725
}
2826
}
2927

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Mon Oct 14 15:15:59 CST 2019
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

pickerview/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
2+
//apply plugin: 'com.github.dcendents.android-maven'
33
//apply plugin: 'com.novoda.bintray-release'//添加JCenter插件
44

55

66

77
android {
8+
namespace 'com.bigkoo.pickerview'
89
compileSdkVersion 26
910

1011
defaultConfig {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.bigkoo.pickerview">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43

54
</manifest>

pickerview/src/main/java/com/bigkoo/pickerview/view/TimePickerView.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.content.Context;
44
import android.text.TextUtils;
5-
import android.util.Log;
65
import android.view.LayoutInflater;
76
import android.view.View;
87
import android.widget.Button;
@@ -15,7 +14,6 @@
1514
import com.bigkoo.pickerview.listener.ISelectTimeCallback;
1615

1716
import java.text.ParseException;
18-
import java.text.SimpleDateFormat;
1917
import java.util.Calendar;
2018
import java.util.Date;
2119

@@ -320,4 +318,8 @@ public boolean isLunarCalendar() {
320318
public boolean isDialog() {
321319
return mPickerOptions.isDialog;
322320
}
321+
322+
public WheelTime getWheelTime() {
323+
return wheelTime;
324+
}
323325
}

pickerview/src/main/java/com/bigkoo/pickerview/view/WheelTime.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,4 +1117,28 @@ public void setAlphaGradient(boolean isAlphaGradient) {
11171117
wv_minutes.setAlphaGradient(isAlphaGradient);
11181118
wv_seconds.setAlphaGradient(isAlphaGradient);
11191119
}
1120+
1121+
public WheelView getWv_year() {
1122+
return wv_year;
1123+
}
1124+
1125+
public WheelView getWv_month() {
1126+
return wv_month;
1127+
}
1128+
1129+
public WheelView getWv_day() {
1130+
return wv_day;
1131+
}
1132+
1133+
public WheelView getWv_hours() {
1134+
return wv_hours;
1135+
}
1136+
1137+
public WheelView getWv_minutes() {
1138+
return wv_minutes;
1139+
}
1140+
1141+
public WheelView getWv_seconds() {
1142+
return wv_seconds;
1143+
}
11201144
}

wheelview/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
2+
//apply plugin: 'com.github.dcendents.android-maven'
33
//apply plugin: 'com.novoda.bintray-release'//添加插件
44

55

66

77
android {
8+
namespace 'com.contrarywind'
89
compileSdkVersion 26
910

1011
defaultConfig {

0 commit comments

Comments
 (0)