Skip to content

Commit 6009f26

Browse files
author
chenhao
committed
升级权限库
1 parent 1e5d90b commit 6009f26

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

.idea/misc.xml

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

SmartCode/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ dependencies {
136136
api 'me.jessyan:autosize:1.2.1'
137137
api 'me.jessyan:retrofit-url-manager:1.4.0'
138138
api 'com.tencent:mmkv-static:1.2.9'
139-
api 'com.yanzhenjie.permission:x:2.0.1'
139+
api 'com.yanzhenjie:permission:2.0.3'
140140
api 'org.simple:androideventbus:1.0.5.1'
141141
api 'com.getkeepsafe.relinker:relinker:1.3.1'
142142
api 'com.tencent.tbs.tbssdk:sdk:43697'

app/src/main/java/ch/smart/code/lib/MainActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ class MainActivity : Activity(), StatusBarAdapter {
7171
testSelectVideo.click {
7272
openVideoSelect(this, selectListener)
7373
}
74+
testPermission.click {
75+
requestCameraAndStorage(this) {
76+
showToast("获取成功!")
77+
}
78+
}
7479
requestForStartup(this) {
7580
Timber.i("初始化权限成功")
7681
}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,18 @@
7979
app:qmui_backgroundColor="@color/public_white"
8080
app:qmui_isRadiusAdjustBounds="true" />
8181

82+
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
83+
android:id="@+id/testPermission"
84+
android:layout_width="wrap_content"
85+
android:layout_height="@dimen/public_pt_40"
86+
android:layout_marginTop="@dimen/public_pt_10"
87+
android:gravity="center"
88+
android:paddingStart="@dimen/public_pt_15"
89+
android:paddingEnd="@dimen/public_pt_15"
90+
android:text="测试权限"
91+
android:textColor="@color/public_colorPrimary"
92+
android:textSize="@dimen/public_font_16pt"
93+
app:qmui_backgroundColor="@color/public_white"
94+
app:qmui_isRadiusAdjustBounds="true" />
95+
8296
</LinearLayout>

0 commit comments

Comments
 (0)