Skip to content

Commit

Permalink
see 09/05 log
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankj committed Sep 6, 2018
1 parent 6718e06 commit cdcb76f
Show file tree
Hide file tree
Showing 20 changed files with 748 additions and 451 deletions.
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png

[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.0-brightgreen.svg
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.1-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode

[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen

[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png

[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.0-brightgreen.svg
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.1-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode

[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.blankj.androidutilcode.feature.core.CoreUtilActivity;
import com.blankj.androidutilcode.feature.sub.SubUtilActivity;
import com.blankj.utilcode.util.BarUtils;
import com.blankj.utilcode.util.EncryptUtils;

/**
* <pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public abstract class BaseActivity extends AppCompatActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
ScreenUtils.adaptScreen4VerticalSlide(this, 720);
super.onCreate(savedInstanceState);
mActivity = this;
Bundle bundle = getIntent().getExtras();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.blankj.androidutilcode.R;
import com.blankj.androidutilcode.base.BaseBackActivity;
import com.blankj.utilcode.util.PathUtils;
import com.blankj.utilcode.util.SpanUtils;

/**
Expand Down Expand Up @@ -42,7 +43,45 @@ public void initView(Bundle savedInstanceState, View contentView) {

TextView tvAboutMetaData = findViewById(R.id.tv_about_path);
tvAboutMetaData.setText(new SpanUtils()
// .appendLine("getRootPath: " + PathUtils.getRootPath())
.appendLine("getRootPath: " + PathUtils.getRootPath())
.appendLine("getDataPath: " + PathUtils.getDataPath())
.appendLine("getDownloadCachePath: " + PathUtils.getDownloadCachePath())

.appendLine("getInternalAppDataPath: " + PathUtils.getInternalAppDataPath())
.appendLine("getInternalAppCodeCacheDir: " + PathUtils.getInternalAppCodeCacheDir())
.appendLine("getInternalAppCachePath: " + PathUtils.getInternalAppCachePath())
.appendLine("getInternalAppDbsPath: " + PathUtils.getInternalAppDbsPath())
.appendLine("getInternalAppDbPath: " + PathUtils.getInternalAppDbPath("demo"))
.appendLine("getInternalAppFilesPath: " + PathUtils.getInternalAppFilesPath())
.appendLine("getInternalAppSpPath: " + PathUtils.getInternalAppSpPath())
.appendLine("getInternalAppNoBackupFilesPath: " + PathUtils.getInternalAppNoBackupFilesPath())

.appendLine("getExternalStoragePath: " + PathUtils.getExternalStoragePath())
.appendLine("getExternalMusicPath: " + PathUtils.getExternalMusicPath())
.appendLine("getExternalPodcastsPath: " + PathUtils.getExternalPodcastsPath())
.appendLine("getExternalRingtonesPath: " + PathUtils.getExternalRingtonesPath())
.appendLine("getExternalAlarmsPath: " + PathUtils.getExternalAlarmsPath())
.appendLine("getExternalNotificationsPath: " + PathUtils.getExternalNotificationsPath())
.appendLine("getExternalPicturesPath: " + PathUtils.getExternalPicturesPath())
.appendLine("getExternalMoviesPath: " + PathUtils.getExternalMoviesPath())
.appendLine("getExternalDownloadsPath: " + PathUtils.getExternalDownloadsPath())
.appendLine("getExternalDcimPath: " + PathUtils.getExternalDcimPath())
.appendLine("getExternalDocumentsPath: " + PathUtils.getExternalDocumentsPath())

.appendLine("getExternalAppDataPath: " + PathUtils.getExternalAppDataPath())
.appendLine("getExternalAppCachePath: " + PathUtils.getExternalAppCachePath())
.appendLine("getExternalAppFilesPath: " + PathUtils.getExternalAppFilesPath())
.appendLine("getExternalAppMusicPath: " + PathUtils.getExternalAppMusicPath())
.appendLine("getExternalAppPodcastsPath: " + PathUtils.getExternalAppPodcastsPath())
.appendLine("getExternalAppRingtonesPath: " + PathUtils.getExternalAppRingtonesPath())
.appendLine("getExternalAppAlarmsPath: " + PathUtils.getExternalAppAlarmsPath())
.appendLine("getExternalAppNotificationsPath: " + PathUtils.getExternalAppNotificationsPath())
.appendLine("getExternalAppPicturesPath: " + PathUtils.getExternalAppPicturesPath())
.appendLine("getExternalAppMoviesPath: " + PathUtils.getExternalAppMoviesPath())
.appendLine("getExternalAppDownloadPath: " + PathUtils.getExternalAppDownloadPath())
.appendLine("getExternalAppDcimPath: " + PathUtils.getExternalAppDcimPath())
.appendLine("getExternalAppDocumentsPath: " + PathUtils.getExternalAppDocumentsPath())
.appendLine("getExternalAppObbPath: " + PathUtils.getExternalAppObbPath())
.append("")
.create());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void initView(Bundle savedInstanceState, View contentView) {
findViewById(R.id.btn_open_app_settings).setOnClickListener(this);
findViewById(R.id.btn_request_calendar).setOnClickListener(this);
findViewById(R.id.btn_request_record_audio).setOnClickListener(this);
findViewById(R.id.btn_request_calendar_and_record_audio).setOnClickListener(this);

StringBuilder sb = new StringBuilder();
for (String s : PermissionUtils.getPermissions()) {
Expand Down Expand Up @@ -139,6 +140,32 @@ public void onDenied(List<String> permissionsDeniedForever,
})
.request();
break;
case R.id.btn_request_calendar_and_record_audio:
PermissionUtils.permission(PermissionConstants.CALENDAR, PermissionConstants.MICROPHONE)
.rationale(new PermissionUtils.OnRationaleListener() {
@Override
public void rationale(final ShouldRequest shouldRequest) {
DialogHelper.showRationaleDialog(shouldRequest);
}
})
.callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
updateAboutPermission();
LogUtils.d(permissionsGranted);
}

@Override
public void onDenied(List<String> permissionsDeniedForever,
List<String> permissionsDenied) {
if (!permissionsDeniedForever.isEmpty()) {
DialogHelper.showOpenAppSettingDialog();
}
LogUtils.d(permissionsDeniedForever, permissionsDenied);
}
})
.request();
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
import android.support.v4.content.ContextCompat;
import android.view.Gravity;
import android.view.View;
import android.widget.Toast;

import com.blankj.androidutilcode.R;
import com.blankj.androidutilcode.base.BaseBackActivity;
import com.blankj.utilcode.util.SizeUtils;
import com.blankj.utilcode.util.SpanUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.blankj.utilcode.util.Utils;

/**
* <pre>
Expand Down
50 changes: 0 additions & 50 deletions app/src/main/res_core/layout/activity_keyboard1.xml

This file was deleted.

7 changes: 7 additions & 0 deletions app/src/main/res_core/layout/activity_permission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@
android:layout_height="wrap_content"
android:text="@string/permission_request_record_audio" />

<Button
android:id="@+id/btn_request_calendar_and_record_audio"
style="@style/WideBtnStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/permission_request_calendar" />

</LinearLayout>
15 changes: 7 additions & 8 deletions app/src/main/res_core/layout/activity_util_core.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
Expand Down Expand Up @@ -92,12 +91,12 @@
android:onClick="networkClick"
android:text="@string/demo_network" />

<!--<Button-->
<!--style="@style/WideBtnStyle"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:onClick="pathClick"-->
<!--android:text="@string/demo_path" />-->
<Button
style="@style/WideBtnStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="pathClick"
android:text="@string/demo_path" />

<Button
style="@style/WideBtnStyle"
Expand Down
Loading

0 comments on commit cdcb76f

Please sign in to comment.