Skip to content

Commit 300a1b7

Browse files
committed
merger
1 parent 395d1ad commit 300a1b7

File tree

51 files changed

+561
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+561
-108
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
*.hprof

Diff for: .idea/gradle.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/modules.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: butterknifelibrary/src/main/AndroidManifest.xml

-1
This file was deleted.

Diff for: butterknifelibrary/src/main/java/com/example/shining/butterknifelibrary/BaseActivity.java

-24
This file was deleted.

Diff for: butterknifelibrary/src/main/res/values/strings.xml

-3
This file was deleted.

Diff for: mzbanner/src/main/java/com/zhouwei/mzbanner/MZBannerView.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ public void setBannerPageClickListener(BannerPageClickListener bannerPageClickLi
320320
*/
321321
public void setIndicatorVisible(boolean visible){
322322
if(visible){
323+
// mIndicatorContainer.setBackgroundResource(R.drawable.indicator_bg_trans);
324+
// mIndicatorContainer.setPadding(40,10,40,10);
323325
mIndicatorContainer.setVisibility(VISIBLE);
324326
}else{
325327
mIndicatorContainer.setVisibility(GONE);
@@ -476,8 +478,12 @@ public int getDuration(){
476478
return mViewPagerScroller.getScrollDuration();
477479
}
478480

479-
480-
481+
/**
482+
* 获取mIndicatorContainer的背景
483+
*/
484+
public LinearLayout getmIndicatorContainer(){
485+
return mIndicatorContainer;
486+
}
481487

482488

483489
public static class MZPagerAdapter<T> extends PagerAdapter{
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
3+
4+
<solid android:color="#80000000" />
5+
6+
<corners android:radius="80dp" />
7+
8+
</shape>
+27-27
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:orientation="vertical"
4-
android:clipChildren="false"
5-
android:layout_width="match_parent"
6-
android:layout_height="match_parent">
7-
<com.zhouwei.mzbanner.CustomViewPager
8-
android:id="@+id/mzbanner_vp"
9-
android:layout_width="match_parent"
10-
android:layout_height="wrap_content"
11-
android:clipChildren="false"
12-
android:layout_marginLeft="30dp"
13-
android:layout_marginRight="30dp"
14-
>
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:clipChildren="false"
6+
android:orientation="vertical">
157

16-
</com.zhouwei.mzbanner.CustomViewPager>
17-
<RelativeLayout
18-
android:layout_width="match_parent"
19-
android:layout_height="wrap_content"
20-
android:layout_alignParentBottom="true"
21-
android:layout_marginBottom="20dp"
22-
>
23-
<LinearLayout
24-
android:id="@+id/banner_indicator_container"
25-
android:layout_width="wrap_content"
26-
android:layout_height="wrap_content"
27-
android:orientation="horizontal"
28-
android:layout_centerHorizontal="true"
29-
/>
30-
</RelativeLayout>
8+
<com.zhouwei.mzbanner.CustomViewPager
9+
android:id="@+id/mzbanner_vp"
10+
android:layout_width="match_parent"
11+
android:layout_height="wrap_content"
12+
android:layout_marginLeft="30dp"
13+
android:layout_marginRight="30dp"
14+
android:clipChildren="false">
15+
16+
</com.zhouwei.mzbanner.CustomViewPager>
17+
18+
<RelativeLayout
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content"
21+
android:layout_alignParentBottom="true"
22+
android:layout_marginBottom="20dp">
23+
24+
<LinearLayout
25+
android:id="@+id/banner_indicator_container"
26+
android:layout_width="wrap_content"
27+
android:layout_height="wrap_content"
28+
android:layout_centerHorizontal="true"
29+
android:orientation="horizontal" />
30+
</RelativeLayout>
3131
</RelativeLayout>
+23-22
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:orientation="vertical"
4-
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
6-
<com.zhouwei.mzbanner.CustomViewPager
7-
android:id="@+id/mzbanner_vp"
8-
android:layout_width="match_parent"
9-
android:layout_height="wrap_content">
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:orientation="vertical">
106

11-
</com.zhouwei.mzbanner.CustomViewPager>
12-
<RelativeLayout
13-
android:layout_width="match_parent"
14-
android:layout_height="wrap_content"
15-
android:layout_alignParentBottom="true"
16-
android:layout_marginBottom="20dp"
17-
>
18-
<LinearLayout
19-
android:id="@+id/banner_indicator_container"
20-
android:layout_width="wrap_content"
21-
android:layout_height="wrap_content"
22-
android:orientation="horizontal"
23-
android:layout_centerHorizontal="true"
24-
/>
25-
</RelativeLayout>
7+
<com.zhouwei.mzbanner.CustomViewPager
8+
android:id="@+id/mzbanner_vp"
9+
android:layout_width="match_parent"
10+
android:layout_height="wrap_content">
11+
12+
</com.zhouwei.mzbanner.CustomViewPager>
13+
14+
<RelativeLayout
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content"
17+
android:layout_alignParentBottom="true"
18+
android:layout_marginBottom="20dp">
19+
20+
<LinearLayout
21+
android:id="@+id/banner_indicator_container"
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"
24+
android:layout_centerHorizontal="true"
25+
android:orientation="horizontal" />
26+
</RelativeLayout>
2627
</RelativeLayout>

Diff for: p029_banner_lunbo/src/main/java/com/example/p029_banner_lunbo/bannerutils/fangyuan/DotIndicatorView.java

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ private void initView(int normalColor, int currentColor, int currentStyle, int c
7878
}
7979

8080
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
81+
8182
}
8283

8384
@Override

Diff for: p041_glide411largeimg/build.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ android {
1010
targetSdkVersion 26
1111
versionCode 1
1212
versionName "1.0"
13-
13+
javaCompileOptions {
14+
annotationProcessorOptions {
15+
includeCompileClasspath true
16+
}
17+
}
1418
}
1519

1620
lintOptions {

Diff for: p045_butterknifebannerviewgradle300/build.gradle

+14-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ apply plugin: 'com.android.application'
44
android {
55
compileSdkVersion 26
66
buildToolsVersion '26.0.2'
7-
7+
sourceSets {
8+
main {
9+
jniLibs.srcDirs = ['libs']
10+
}
11+
}
812
defaultConfig {
913
applicationId "com.example.shining.p045_butterknifegradle300"
1014
minSdkVersion 21
@@ -33,6 +37,12 @@ android {
3337

3438
}
3539

40+
repositories {
41+
flatDir {
42+
dirs project(':p045_butterknifebannerviewgradle300').file('libs')
43+
}
44+
}
45+
3646
dependencies {
3747
implementation fileTree(dir: 'libs', include: ['*.jar'])
3848

@@ -42,14 +52,15 @@ dependencies {
4252
androidTestImplementation 'com.android.support.test:runner:1.0.1'
4353
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
4454
// compile project(':butterknifelibrary')
45-
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
55+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
4656
compile 'com.jakewharton:butterknife:8.6.0'
4757
compile 'com.github.bumptech.glide:glide:4.1.1'
4858
compile 'com.github.bumptech.glide:compiler:4.1.1'
4959
compile "com.github.bumptech.glide:okhttp3-integration:4.1.1"
5060

5161
// compile 'com.github.pinguo-zhouwei:MZBannerView:v2.0.0'
52-
compile project(':mzbanner')
62+
// compile project(':mzbanner')
63+
compile(name: 'mzbanner', ext: 'aar')
5364

5465

5566
}
33.6 KB
Binary file not shown.

Diff for: p045_butterknifebannerviewgradle300/src/main/java/com/example/shining/p045_butterknifegradle300/bannerviews/Banner1Activity.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ protected void setup(@Nullable Bundle savedInstanceState) {
5252
Data1();
5353

5454
//
55-
mMZBannerView.setIndicatorRes(R.drawable.indicator_normal_blue, R.drawable.indicator_selected_black);
5655
mMZBannerView.setDelayedTime(6000);
56+
mMZBannerView.setIndicatorRes(R.drawable.indicator_normal_blue, R.drawable.indicator_selected_black);
5757
mMZBannerView.setIndicatorVisible(true);
5858
mMZBannerView.setIndicatorAlign(MZBannerView.IndicatorAlign.CENTER);
59+
mMZBannerView.getmIndicatorContainer().setPadding(40,10,40,10);
60+
mMZBannerView.getmIndicatorContainer().setBackgroundResource(R.drawable.indicator_bg_trans10);
61+
5962
mMZBannerView.addPageChangeLisnter(new ViewPager.OnPageChangeListener() {
6063
@Override
6164
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
@@ -73,7 +76,7 @@ public void onPageScrollStateChanged(int state) {
7376
}
7477
});
7578
setBanner(mList1);
76-
mMZBannerView.start();
79+
// mMZBannerView.start();
7780
}
7881

7982
private void Data1() {
@@ -132,4 +135,10 @@ protected void onPause() {
132135
mMZBannerView.pause();
133136
// GlideUtil.clearMemoryCache();
134137
}
138+
139+
@Override
140+
protected void onResume() {
141+
super.onResume();
142+
mMZBannerView.start();
143+
}
135144
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
3+
4+
<solid android:color="#80000000" />
5+
6+
<corners android:radius="80dp" />
7+
8+
</shape>
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
33
android:shape="oval">
4-
<solid android:color="@android:color/holo_blue_bright" />
4+
<solid android:color="@android:color/white" />
55
<size
6-
android:width="5dp"
7-
android:height="5dp" />
6+
android:width="10dp"
7+
android:height="10dp" />
88
</shape>
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:shape="oval">
4-
<solid android:color="@android:color/black" />
3+
android:shape="rectangle">
4+
<corners android:radius="10dp" />
5+
6+
<solid android:color="@android:color/white" />
7+
8+
<padding
9+
android:bottom="0.01dp"
10+
android:left="0.01dp"
11+
android:right="0.01dp"
12+
android:top="0.01dp" />
13+
514
<size
6-
android:width="5dp"
7-
android:height="5dp" />
15+
android:width="20dp"
16+
android:height="10dp" />
817
</shape>

Diff for: p045_butterknifebannerviewgradle300/src/main/res/layout/activity_banner1.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
app:indicatorAlign="center"
1414
app:indicatorPaddingLeft="10dp"
1515
app:middle_page_cover="true"
16-
app:open_mz_mode="true" />
16+
app:open_mz_mode="false" />
1717

1818
</RelativeLayout>
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
apply plugin: 'com.android.library'
2-
//apply plugin: 'com.jakewharton:butterknife'
1+
apply plugin: 'com.android.application'
32

43
android {
54
compileSdkVersion 26
65

6+
7+
78
defaultConfig {
9+
applicationId "com.example.shining.p046_progressbar"
810
minSdkVersion 21
911
targetSdkVersion 26
1012
versionCode 1
1113
versionName "1.0"
12-
javaCompileOptions {
13-
annotationProcessorOptions {
14-
includeCompileClasspath true
15-
}
16-
}
14+
1715
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1816

1917
}
@@ -31,10 +29,8 @@ dependencies {
3129
implementation fileTree(dir: 'libs', include: ['*.jar'])
3230

3331
implementation 'com.android.support:appcompat-v7:26.1.0'
32+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
3433
testImplementation 'junit:junit:4.12'
3534
androidTestImplementation 'com.android.support.test:runner:1.0.1'
3635
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
37-
//the third file
38-
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
39-
compile 'com.jakewharton:butterknife:8.6.0'
4036
}
File renamed without changes.

0 commit comments

Comments
 (0)