Skip to content

Commit 49b8de6

Browse files
author
wangpeng
committed
change package
1 parent 6d90327 commit 49b8de6

32 files changed

+232
-367
lines changed

.idea/.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

.idea/gradle.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
## Usage
1111
1. add library
1212

13-
`compile 'ch.ielse:switchbutton:1.0.1'`
13+
`compile 'com.github.iielse.switchbutton:switchbutton:1.0.4'`
1414

1515
2. xml
1616
```
17-
<ch.ielse.view.SwitchView
17+
<com.github.iielse.switchbutton.SwitchView
1818
android:layout_width="wrap_content"
1919
android:layout_height="wrap_content"/>
2020
```

app/build.gradle

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 23
5-
buildToolsVersion "23.0.2"
4+
compileSdkVersion 29
5+
buildToolsVersion "29.0.2"
66

77
defaultConfig {
8-
applicationId "ch.ielse.demo"
9-
minSdkVersion 10
10-
targetSdkVersion 23
8+
applicationId "com.github.iielse.switchbutton.demo"
9+
minSdkVersion 14
10+
targetSdkVersion 29
1111
versionCode 1
12-
versionName "1.0"
12+
versionName "1.0.0"
1313
}
1414
buildTypes {
1515
release {
@@ -20,9 +20,7 @@ android {
2020
}
2121

2222
dependencies {
23-
compile 'com.android.support:appcompat-v7:23.3.0'
24-
compile 'com.android.support:design:23.3.0'
25-
// compile project(':switchbutton')
26-
27-
compile 'ch.ielse:switchbutton:1.0.1'
23+
implementation 'androidx.appcompat:appcompat:1.1.0'
24+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
25+
implementation project(':switchbutton')
2826
}

app/src/androidTest/java/ch/ielse/view/ApplicationTest.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="ch.ielse.demo"
2+
<manifest package="com.github.iielse.switchbutton.demo"
33
xmlns:android="http://schemas.android.com/apk/res/android">
44

55
<application
6-
android:allowBackup="true"
76
android:icon="@mipmap/ic_launcher"
87
android:label="@string/app_name"
98
android:supportsRtl="true"

app/src/main/java/ch/ielse/demo/APIIntroActivity.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/APIIntroActivity.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.AppCompatActivity;
5-
import android.support.v7.widget.Toolbar;
4+
import androidx.appcompat.app.AppCompatActivity;
5+
import androidx.appcompat.widget.Toolbar;
66
import android.view.View;
77

8-
import ch.ielse.view.SwitchView;
8+
import com.github.iielse.switchbutton.SwitchView;
9+
10+
11+
912

1013
public class APIIntroActivity extends AppCompatActivity {
1114

app/src/main/java/ch/ielse/demo/ItemObject.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/ItemObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
/**
44
* Created by LY on 2016/9/13.

app/src/main/java/ch/ielse/demo/ListActivity.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/ListActivity.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.AppCompatActivity;
5-
import android.support.v7.widget.Toolbar;
4+
import androidx.appcompat.app.AppCompatActivity;
5+
import androidx.appcompat.widget.Toolbar;
66
import android.view.LayoutInflater;
77
import android.view.View;
88
import android.view.ViewGroup;
@@ -14,7 +14,9 @@
1414
import java.util.ArrayList;
1515
import java.util.List;
1616

17-
import ch.ielse.view.SwitchView;
17+
import com.github.iielse.switchbutton.SwitchView;
18+
19+
1820

1921
public class ListActivity extends AppCompatActivity {
2022

app/src/main/java/ch/ielse/demo/MainActivity.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/MainActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.content.Intent;
44
import android.os.Bundle;
5-
import android.support.v7.app.AppCompatActivity;
5+
import androidx.appcompat.app.AppCompatActivity;
66
import android.view.View;
77

8+
9+
810
public class MainActivity extends AppCompatActivity {
911

1012

app/src/main/java/ch/ielse/demo/NormalActivity.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/NormalActivity.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.graphics.drawable.AnimationDrawable;
44
import android.os.Bundle;
55
import android.os.Handler;
66
import android.os.Looper;
7-
import android.support.annotation.NonNull;
8-
import android.support.v7.app.AppCompatActivity;
9-
import android.support.v7.widget.Toolbar;
7+
import androidx.annotation.NonNull;
8+
9+
10+
import androidx.appcompat.app.AppCompatActivity;
11+
import androidx.appcompat.widget.Toolbar;
1012
import android.view.View;
1113
import android.widget.ImageView;
1214
import android.widget.Toast;
1315

14-
import ch.ielse.view.SwitchView;
16+
import com.github.iielse.switchbutton.SwitchView;
17+
18+
19+
1520

1621
public class NormalActivity extends AppCompatActivity {
1722

app/src/main/java/ch/ielse/demo/RecyclerActivity.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/RecyclerActivity.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.AppCompatActivity;
5-
import android.support.v7.widget.LinearLayoutManager;
6-
import android.support.v7.widget.RecyclerView;
7-
import android.support.v7.widget.Toolbar;
4+
import androidx.appcompat.app.AppCompatActivity;
5+
import androidx.appcompat.widget.Toolbar;
6+
import androidx.recyclerview.widget.LinearLayoutManager;
7+
import androidx.recyclerview.widget.RecyclerView;
8+
89
import android.view.LayoutInflater;
910
import android.view.View;
1011
import android.view.ViewGroup;
@@ -13,7 +14,8 @@
1314
import java.util.ArrayList;
1415
import java.util.List;
1516

16-
import ch.ielse.view.SwitchView;
17+
import com.github.iielse.switchbutton.SwitchView;
18+
1719

1820
public class RecyclerActivity extends AppCompatActivity {
1921

app/src/main/java/ch/ielse/demo/SizeIntroActivity.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/SizeIntroActivity.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.AppCompatActivity;
5-
import android.support.v7.widget.Toolbar;
4+
import androidx.appcompat.app.AppCompatActivity;
5+
import androidx.appcompat.widget.Toolbar;
66
import android.view.View;
77

8-
import ch.ielse.view.SwitchView;
8+
import com.github.iielse.switchbutton.SwitchView;
9+
10+
11+
912

1013
public class SizeIntroActivity extends AppCompatActivity {
1114

app/src/main/java/ch/ielse/demo/SpfsUtils.java renamed to app/src/main/java/com/github/iielse/switchbutton/demo/SpfsUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ch.ielse.demo;
1+
package com.github.iielse.switchbutton.demo;
22

33
import android.content.Context;
44
import android.content.SharedPreferences;

app/src/main/res/layout/activity_api_intro.xml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,16 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
76
android:orientation="vertical">
87

9-
<android.support.design.widget.AppBarLayout
10-
android:layout_width="match_parent"
11-
android:layout_height="wrap_content"
12-
android:theme="@style/AppTheme.AppBarOverlay">
13-
14-
<android.support.v7.widget.Toolbar
8+
<androidx.appcompat.widget.Toolbar
159
android:id="@+id/toolbar"
1610
android:layout_width="match_parent"
1711
android:layout_height="?attr/actionBarSize"
1812
android:background="?attr/colorPrimary"
1913
app:navigationIcon="@mipmap/common_back_white"
2014
app:title="基本API" />
2115

22-
</android.support.design.widget.AppBarLayout>
23-
24-
2516
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2617
android:id="@+id/v_scroll"
2718
android:layout_width="match_parent"
@@ -54,7 +45,7 @@
5445
android:padding="10dip"
5546
android:paddingLeft="12dip">
5647

57-
<ch.ielse.view.SwitchView
48+
<com.github.iielse.switchbutton.SwitchView
5849
android:id="@+id/v_switch_1"
5950
android:layout_width="wrap_content"
6051
android:layout_height="wrap_content"
@@ -114,7 +105,7 @@
114105
android:padding="10dip"
115106
android:paddingLeft="12dip">
116107

117-
<ch.ielse.view.SwitchView
108+
<com.github.iielse.switchbutton.SwitchView
118109
android:id="@+id/v_switch_2"
119110
android:layout_width="wrap_content"
120111
android:layout_height="wrap_content"
@@ -156,14 +147,14 @@
156147
android:padding="10dip"
157148
android:paddingLeft="12dip">
158149

159-
<ch.ielse.view.SwitchView
150+
<com.github.iielse.switchbutton.SwitchView
160151
android:id="@+id/v_switch_3"
161152
android:layout_width="wrap_content"
162153
android:layout_height="wrap_content"
163154
android:layout_marginBottom="10dip"
164155
app:isOpened="true" />
165156

166-
<ch.ielse.view.SwitchView
157+
<com.github.iielse.switchbutton.SwitchView
167158
android:layout_width="wrap_content"
168159
android:layout_height="wrap_content"
169160
android:layout_marginLeft="20dip"
@@ -212,7 +203,7 @@
212203
android:text="补充\n设置关闭时颜色 可以在xml中设置\napp:offColor='#FFF73E45' app:offColorDark='#FFE62D34' \n设置阴影颜色\napp:shadowColor='#FFFFC400'"
213204
android:textColor="#FFFFFF" />
214205

215-
<ch.ielse.view.SwitchView
206+
<com.github.iielse.switchbutton.SwitchView
216207
android:layout_width="wrap_content"
217208
android:layout_height="wrap_content"
218209
android:layout_marginLeft="12dp"

app/src/main/res/layout/activity_list.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@
77
android:background="#EEEFF3"
88
android:orientation="vertical">
99

10-
<android.support.design.widget.AppBarLayout
11-
android:layout_width="match_parent"
12-
android:layout_height="wrap_content"
13-
android:theme="@style/AppTheme.AppBarOverlay">
14-
15-
<android.support.v7.widget.Toolbar
10+
<androidx.appcompat.widget.Toolbar
1611
android:id="@+id/toolbar"
1712
android:layout_width="match_parent"
1813
android:layout_height="?attr/actionBarSize"
1914
android:background="?attr/colorPrimary"
2015
app:navigationIcon="@mipmap/common_back_white"
2116
app:title="List(即时切换状态)"/>
2217

23-
</android.support.design.widget.AppBarLayout>
24-
2518

2619
<ListView
2720
android:id="@+id/v_list"

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@
77
android:background="#FFFFFF"
88
android:orientation="vertical">
99

10-
<android.support.design.widget.AppBarLayout
11-
android:layout_width="match_parent"
12-
android:layout_height="wrap_content"
13-
android:theme="@style/AppTheme.AppBarOverlay">
14-
15-
<android.support.v7.widget.Toolbar
10+
<androidx.appcompat.widget.Toolbar
1611
android:id="@+id/toolbar"
1712
android:layout_width="match_parent"
1813
android:layout_height="?attr/actionBarSize"
1914
android:background="?attr/colorPrimary"
2015
app:title="@string/app_name"/>
2116

22-
</android.support.design.widget.AppBarLayout>
23-
2417
<Button
2518
android:id="@+id/b_api_intro"
2619
android:layout_width="wrap_content"

0 commit comments

Comments
 (0)