Skip to content

Commit

Permalink
[Version] Update new version 1.1.0(11)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianma8023 committed Jun 3, 2019
1 parent bfd1906 commit 272b7fc
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 8 deletions.
4 changes: 4 additions & 0 deletions LOG-CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 更新日志
- 19.06.03 1.1.0
1. 新增可选项:隐藏 HD 图标
2. 新增可选项:自定义下拉天气字体颜色和大小
3. 新增可选项:显示小号的电量百分比符号
- 19.05.31 1.0.9
1. 新增可选项:下拉显示天气
2. 修复:信号左移时位置偏上的问题
Expand Down
4 changes: 4 additions & 0 deletions LOG-EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Update Logs
- 19.06.03 1.1.0
1. New option: hide HD icon.
2. New option: custom weather info text color and size.
3. New option: show small battery percent sign.
- 19.05.31 1.0.9
1. New option: show weather info in dropdown status bar.
2. Bug fixes: align top & left issue about mobile signal icons.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# XMiuiClock
# XMiTools
An xposed module for MIUI 10 SystemUI.

[中文说明](/README-CN.md)
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId "com.tianma.tweaks.miui"
minSdkVersion 21
targetSdkVersion 27
versionCode 10
versionName "1.0.9"
versionCode 11
versionName "1.1.0"

buildConfigField("String", "LOG_TAG", "\"XMiTools\"")
buildConfigField("boolean", "LOG_TO_XPOSED", "true")
Expand Down Expand Up @@ -71,7 +71,7 @@ android {

applicationVariants.all { variant ->
variant.outputs.all { output ->
output.outputFileName = "XMiuiClock_${variant.versionName.replaceAll('\\s+', '_')}_${releaseTime()}_${variant.buildType.name.charAt(0)}.apk"
output.outputFileName = "XMiTools_${variant.versionName.replaceAll('\\s+', '_')}_${releaseTime()}_${variant.buildType.name.charAt(0)}.apk"
}
}
}
Expand All @@ -80,7 +80,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0' // material design support
implementation 'androidx.preference:preference:1.0.0' // preference-v7
implementation 'androidx.preference:preference:1.1.0-alpha05' // preference-v7
implementation 'androidx.browser:browser:1.0.0' // custom tabs

// Xposed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ protected void onCreate(Bundle savedInstanceState) {

setupToolbar();

getSupportFragmentManager()
mToolbar.post(() -> getSupportFragmentManager()
.beginTransaction()
.replace(R.id.home_content, new MainSettingsFragment())
.commit();
.commit());
}

private void setupToolbar() {
Expand Down
55 changes: 54 additions & 1 deletion app/src/main/java/com/tianma/tweaks/miui/utils/DebugHelper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.tianma.tweaks.miui.utils;

import android.database.Cursor;
import android.net.Uri;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
Expand All @@ -9,7 +11,7 @@ public class DebugHelper {
private DebugHelper() {
}

public static void tree(View rootView) {
public static void printViewTree(View rootView) {
traverseViewTree(rootView, 0);
}

Expand Down Expand Up @@ -39,4 +41,55 @@ private static void print(int depth, View view) {
}
XLog.d("%s", sb.toString());
}

public static void printCursor(Uri uri, Cursor c) {
XLog.d("%s", uri.toString());
if (c == null) {
return;
}
boolean hasNext = c.moveToNext();
if (!hasNext) {
return;
}

int columnCount = c.getColumnCount();
String[] columnNames = c.getColumnNames();
int[] columnTypes = new int[columnCount];
for (int i = 0; i < columnCount; i++) {
columnTypes[i] = c.getType(i);
}
c.moveToPrevious();
while (c.moveToNext()) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < columnCount; i++) {
Object value = null;
int columnType = columnTypes[i];
if (columnType == Cursor.FIELD_TYPE_INTEGER) {
c.getInt(i);
}
switch (columnType) {
case Cursor.FIELD_TYPE_INTEGER:
value = c.getInt(i);
break;
case Cursor.FIELD_TYPE_BLOB:
value = c.getBlob(i);
break;
case Cursor.FIELD_TYPE_FLOAT:
value = c.getFloat(i);
break;
case Cursor.FIELD_TYPE_STRING:
value = c.getString(i);
break;
default:
case Cursor.FIELD_TYPE_NULL:
break;
}
sb.append(columnNames[i]).append(" = ").append(value).append(", ");
}
sb.append("\n");
XLog.d("%s", sb.toString());
}
}


}

0 comments on commit 272b7fc

Please sign in to comment.