Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
更新 0.0.1.1X
Browse files Browse the repository at this point in the history
  • Loading branch information
snpmyn committed Jan 13, 2021
1 parent 15315a1 commit 5a0ebc0
Show file tree
Hide file tree
Showing 108 changed files with 586 additions and 298 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/zhengshaopeng.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions BgaQrCodeAndroid/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 30
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion "29.0.2"


defaultConfig {
vectorDrawables.useSupportLibrary = true
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -23,8 +23,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility rootProject.ext.compileOptions["sourceCompatibility"]
targetCompatibility rootProject.ext.compileOptions["targetCompatibility"]
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
Expand All @@ -39,7 +39,7 @@ dependencies {
/*自带*/
implementation project(path: ':matisse')
/*matisse*/
implementation 'com.github.snpmyn.Util:utilone:v0.1.2'
implementation 'com.github.snpmyn.Util:utilone:v0.0.1.1X'
/*util*/
api 'cn.bingoogolapple:bga-qrcode-zxing:1.3.7'
/*BgaQrCodeZXing*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.view.View;
import android.widget.ImageButton;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

Expand Down Expand Up @@ -93,7 +94,7 @@ private void setListener() {
}

@Override
public void onClick(View view) {
public void onClick(@NonNull View view) {
// 闪光灯
if (view.getId() == R.id.scanBarCodeActivityIbFlash) {
if (flashOn) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.view.View;
import android.widget.ImageButton;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

Expand Down Expand Up @@ -93,7 +94,7 @@ private void setListener() {
}

@Override
public void onClick(View view) {
public void onClick(@NonNull View view) {
// 闪光灯
if (view.getId() == R.id.scanQrCodeActivityIbFlash) {
if (flashOn) {
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@
| 一方库Library | implementation 'androidx.core:core-ktx:1.5.0-alpha05' |
| 一方库Library | implementation "org.jetbrains.kotlin:*kotlin-stdlib-jdk7*:$kotlin_version" |
| 一方库Library | implementation 'androidx.palette:palette-ktx:1.0.0' |
| 一方库Library | api 'com.github.snpmyn.Util:*utilone*:v0.1.2'(避重)|
| 一方库Library | api 'com.github.snpmyn.Util:*utiltwo*:v0.1.2'(避重)|
| 一方库Library | api 'com.github.snpmyn.Util:*utilone*:v0.0.1.1X'(避重)|
| 一方库Library | api 'com.github.snpmyn.Util:*utiltwo*:v0.0.1.1X'(避重)|
| 一方库Library | api 'com.willowtreeapps.spruce:spruce-android:1.0.1'(避重)|
| 一方库Matisse | implementation 'com.github.snpmyn.Util:utilone:v0.1.2' |
| 一方库Matisse | implementation 'com.github.snpmyn.Util:utilone:v0.0.1.1X' |
| 一方库Matisse | api 'com.zhihu.android:matisse:0.5.3-beta3'(避重)|
| 一方库Ucrop | api 'com.github.yalantis:ucrop:2.2.4'(避重)|
| 一方库BgaQrCodeAndroid | implementation project(path: ':matisse') |
| 一方库BgaQrCodeAndroid | implementation 'com.github.snpmyn.Util:*utilone*:v0.1.2' |
| 一方库Banner | implementation 'com.github.snpmyn.Util:utilone:v0.1.2' |
| 一方库BgaQrCodeAndroid | implementation 'com.github.snpmyn.Util:*utilone*:v0.0.1.1X' |
| 一方库Banner | implementation 'com.github.snpmyn.Util:utilone:v0.0.1.1X' |
| 一方库Banner | api 'com.youth.banner:banner:1.4.10'(避重)|
| 一方库AutoSize | implementation 'me.jessyan:autosize:1.1.2' |
| 二方库Util-示例app | implementation project(path: ':utilone') |
| 二方库Util-示例app | implementation project(path: ':utiltwo') |
| 二方库Util-UtilOne | api 'com.github.bumptech.glide:glide:4.11.0'(避重)|
| 二方库Util-UtilOne | api 'com.google.android.material:material:1.3.0-beta01'(避重)|
| 二方库Util-UtilOne | api 'com.github.bumptech.glide:glide:4.11.0'(避重)|
| 二方库Util-UtilOne | api 'io.reactivex:rxandroid:1.2.1'(避重)|
| 二方库Util-UtilOne | api 'io.reactivex:rxjava:1.3.8'(避重)|
| 二方库Util-UtilOne | api 'com.jakewharton.timber:timber:4.7.1'(避重)|
Expand Down Expand Up @@ -141,12 +141,12 @@ android {
}
dependencies {
implementation 'com.github.snpmyn.Widget:library:v0.1.2'
implementation 'com.github.snpmyn.Widget:matisse:v0.1.2'
implementation 'com.github.snpmyn.Widget:ucrop:v0.1.2'
implementation 'com.github.snpmyn.Widget:BgaQrCodeAndroid:v0.1.2'
implementation 'com.github.snpmyn.Widget:banner:v0.1.2'
implementation 'com.github.snpmyn.Widget:autosize:v0.1.2'
implementation 'com.github.snpmyn.Widget:library:v0.0.1.1X'
implementation 'com.github.snpmyn.Widget:matisse:v0.0.1.1X'
implementation 'com.github.snpmyn.Widget:ucrop:v0.0.1.1X'
implementation 'com.github.snpmyn.Widget:BgaQrCodeAndroid:v0.0.1.1X'
implementation 'com.github.snpmyn.Widget:banner:v0.0.1.1X'
implementation 'com.github.snpmyn.Widget:autosize:v0.0.1.1X'
}
```

Expand Down
17 changes: 8 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.zsp.widget"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
applicationId rootProject.ext.android["applicationId"]
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
Expand All @@ -19,8 +18,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility rootProject.ext.compileOptions["sourceCompatibility"]
targetCompatibility rootProject.ext.compileOptions["targetCompatibility"]
}
dataBinding {
enabled = true
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:targetApi="n">
<activity android:name="example.tripartitelibrary.TripartiteLibraryExampleActivity" />
<activity android:name="example.onepartylibrary.OnePartyLibraryExampleActivity" />
Expand Down Expand Up @@ -71,6 +70,7 @@
<activity android:name="example.onepartylibrary.spruce.SpruceActivity" />
<activity android:name="example.onepartylibrary.screen.ScreenActivity" />
<activity android:name="example.onepartylibrary.spannablestringbuilder.SpannableStringBuilderActivity" />
<activity android:name="example.onepartylibrary.dialog.DialogThreeActivity" />
<activity android:name="example.onepartylibrary.dialog.DialogTwoActivity" />
<activity android:name="example.onepartylibrary.dialog.DialogOneActivity" />
<activity android:name="example.onepartylibrary.dialog.DialogActivity" />
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/java/application/WidgetApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.multidex.MultiDex;

import com.zsp.autosize.AutoSizeInitConfigure;
import com.zsp.library.status.manager.StatusManager;
Expand Down Expand Up @@ -87,10 +85,4 @@ public void onActivityDestroyed(@NonNull Activity activity) {
}
});
}

@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(base);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class LoginOneActivity extends AppCompatActivity {
@BindView(R.id.loginOneActivityPb)
ProgressButton loginOneActivityPb;
@SuppressLint("HandlerLeak")
private final Handler handler = new Handler() {
private final Handler handler = new Handler(getMainLooper()) {
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
}

@SuppressLint("NonConstantResourceId")
@OnClick({R.id.dialogActivityMbDialogOne, R.id.dialogActivityMbDialogTwo})
@OnClick({R.id.dialogActivityMbDialogOne, R.id.dialogActivityMbDialogTwo, R.id.dialogActivityMbDialogThree})
public void onViewClicked(View view) {
switch (view.getId()) {
// 对话框一
Expand All @@ -37,6 +37,10 @@ public void onViewClicked(View view) {
case R.id.dialogActivityMbDialogTwo:
IntentUtils.jumpNoBundle(this, DialogTwoActivity.class);
break;
// 对话框三
case R.id.dialogActivityMbDialogThree:
IntentUtils.jumpNoBundle(this, DialogThreeActivity.class);
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package example.onepartylibrary.dialog;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.zsp.library.dialog.materialalertdialog.MyMaterialAlertDialogBuilder;
import com.zsp.widget.R;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
* @desc: 对话框三页
* @author: zsp
* @date: 2021/1/13 11:13 AM
*/
public class DialogThreeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dialog_three);
ButterKnife.bind(this);
}

@OnClick({R.id.dialogThreeActivityMbDialog})
public void onViewClicked(View view) {
if (view.getId() == R.id.dialogThreeActivityMbDialog) {
new MyMaterialAlertDialogBuilder(this)
.setTitle("标题")
.setMessage("消息")
.setNeutralButton("取消", (dialog, which) -> dialog.dismiss())
.setPositiveButton("确定", (dialog, which) -> dialog.dismiss()).setCancelable(false).show();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.annotation.SuppressLint;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
Expand Down Expand Up @@ -69,6 +70,7 @@ private void setListener() {
*
* @return 条目集
*/
@NonNull
private List<FocusResizeBean> addItems() {
List<FocusResizeBean> items = new ArrayList<>();
items.add(new FocusResizeBean("Possibility", "The Hill", R.drawable.image_one));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.zsp.library.focusresize.BaseFocusResizeAdapter;
Expand Down Expand Up @@ -70,7 +71,7 @@ public int getFooterItemCount() {
}

@Override
public RecyclerView.ViewHolder onCreateFooterViewHolder(ViewGroup parent, int viewType) {
public RecyclerView.ViewHolder onCreateFooterViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.focus_resize_item, parent, false);
return new CustomViewHolder(v);
}
Expand All @@ -81,7 +82,7 @@ public void onBindFooterViewHolder(RecyclerView.ViewHolder holder, int position)
fill((CustomViewHolder) holder, focusResizeBean);
}

private void fill(CustomViewHolder customViewHolder, FocusResizeBean focusResizeBean) {
private void fill(@NonNull CustomViewHolder customViewHolder, @NonNull FocusResizeBean focusResizeBean) {
customViewHolder.focusResizeItemIv.setImageResource(focusResizeBean.getDrawable());
customViewHolder.focusResizeItemTvTitle.setText(focusResizeBean.getTitle());
customViewHolder.focusResizeItemTvSubtitle.setText(focusResizeBean.getSubTitle());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.zsp.library.focusresize.BaseFocusResizeAdapter;
Expand Down Expand Up @@ -54,7 +55,7 @@ public int getFooterItemCount() {
}

@Override
public RecyclerView.ViewHolder onCreateFooterViewHolder(ViewGroup parent, int viewType) {
public RecyclerView.ViewHolder onCreateFooterViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.focus_resize_item, parent, false);
return new DefaultCustomViewHolder(v);
}
Expand All @@ -65,7 +66,7 @@ public void onBindFooterViewHolder(RecyclerView.ViewHolder holder, int position)
fill((DefaultCustomViewHolder) holder, focusResizeBean);
}

private void fill(DefaultCustomViewHolder holder, FocusResizeBean focusResizeBean) {
private void fill(@NonNull DefaultCustomViewHolder holder, @NonNull FocusResizeBean focusResizeBean) {
holder.focusResizeItemIv.setImageResource(focusResizeBean.getDrawable());
holder.focusResizeItemTvTitle.setText(focusResizeBean.getTitle());
holder.focusResizeItemTvSubtitle.setText(focusResizeBean.getSubTitle());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;

Expand Down Expand Up @@ -86,7 +87,7 @@ public void onViewClicked(View view) {
* @param materialIntroViewId String
*/
@Override
public void onUserClick(String materialIntroViewId) {
public void onUserClick(@NonNull String materialIntroViewId) {
if (materialIntroViewId.equals(String.valueOf(guideTwoActivityMcv.getId()))) {
MaterialIntroViewKit.showMaterialIntroView(this,
guideTwoActivityMbButtonOne,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import com.zsp.utilone.toast.ToastUtils;
import com.zsp.widget.R;

import java.util.Objects;

import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down Expand Up @@ -48,7 +50,7 @@ private void execute() {
.subscriptSpan(2, 3, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
.bold(3, 4, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
.italic(3, 4, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
.imageSpan(ContextCompat.getDrawable(this, R.drawable.custom),
.imageSpan(Objects.requireNonNull(ContextCompat.getDrawable(this, R.drawable.custom)),
0, 0, spannableStringBuilderActivityTv.getLineHeight(), spannableStringBuilderActivityTv.getLineHeight(), 3, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
.clickableSpan(() -> ToastUtils.shortShow(SpannableStringBuilderActivity.this, "点击"), 4, 5, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
.urlSpan("http://www.google.com/", 5, 6, Spanned.SPAN_INCLUSIVE_EXCLUSIVE).build();
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/activity_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@
android:layout_height="wrap_content"
android:text="@string/dialogTwo"
android:textAppearance="?android:attr/textAppearanceInverse" />

<com.google.android.material.button.MaterialButton
android:id="@+id/dialogActivityMbDialogThree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dialogThree"
android:textAppearance="?android:attr/textAppearanceInverse" />
</LinearLayout>
Loading

0 comments on commit 5a0ebc0

Please sign in to comment.