Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
f521bce9
Commit
f521bce9
authored
Dec 26, 2016
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update UI component
parent
c7820960
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
5 deletions
+66
-5
Async.java
app/src/main/java/com/topjohnwu/magisk/utils/Async.java
+5
-4
install_fragment.xml
app/src/main/res/layout/install_fragment.xml
+60
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/utils/Async.java
View file @
f521bce9
...
@@ -153,7 +153,7 @@ public class Async {
...
@@ -153,7 +153,7 @@ public class Async {
protected
void
preProcessing
()
throws
Throwable
{}
protected
void
preProcessing
()
throws
Throwable
{}
pr
otected
void
copyToCache
()
throws
Throwable
{
pr
ivate
void
copyToCache
()
throws
Throwable
{
try
{
try
{
InputStream
in
=
mContext
.
getContentResolver
().
openInputStream
(
mUri
);
InputStream
in
=
mContext
.
getContentResolver
().
openInputStream
(
mUri
);
mCachedFile
=
new
File
(
mContext
.
getCacheDir
().
getAbsolutePath
()
+
"/install.zip"
);
mCachedFile
=
new
File
(
mContext
.
getCacheDir
().
getAbsolutePath
()
+
"/install.zip"
);
...
@@ -250,14 +250,15 @@ public class Async {
...
@@ -250,14 +250,15 @@ public class Async {
Toast
.
makeText
(
mContext
,
mContext
.
getString
(
R
.
string
.
invalid_zip
),
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
mContext
,
mContext
.
getString
(
R
.
string
.
invalid_zip
),
Toast
.
LENGTH_LONG
).
show
();
break
;
break
;
case
1
:
case
1
:
done
();
onSuccess
();
break
;
break
;
}
}
}
}
protected
void
done
()
{
protected
void
onSuccess
()
{
SharedPreferences
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
mContext
);
SharedPreferences
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
mContext
);
prefs
.
edit
().
putBoolean
(
"module_done"
,
false
).
putBoolean
(
"update_check_done"
,
true
).
apply
();
StatusFragment
.
updateCheckDone
.
trigger
();
new
LoadModules
().
exec
();
new
LoadModules
().
exec
();
AlertDialog
.
Builder
builder
;
AlertDialog
.
Builder
builder
;
...
...
app/src/main/res/layout/install_fragment.xml
View file @
f521bce9
...
@@ -137,6 +137,66 @@
...
@@ -137,6 +137,66 @@
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id=
"@+id/flash_button"
android:layout_gravity=
"center"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"4dp"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"6dp"
style=
"?attr/cardStyle"
app:cardUseCompatPadding=
"true"
android:layout_width=
"match_parent"
android:foreground=
"?android:attr/selectableItemBackground"
android:clickable=
"true"
>
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:layout_marginEnd=
"25dp"
android:layout_marginStart=
"25dp"
>
<ImageView
android:layout_width=
"50dp"
android:layout_height=
"wrap_content"
app:srcCompat=
"@mipmap/ic_launcher"
android:id=
"@+id/imageView"
android:layout_weight=
"0"
android:layout_marginEnd=
"20dp"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"Magiskify"
android:ems=
"10"
android:gravity=
"center"
android:id=
"@+id/editText"
android:layout_weight=
"1"
android:textStyle=
"bold"
android:textColor=
"@android:color/black"
android:textAllCaps=
"false"
android:textSize=
"20sp"
android:fontFamily=
"sans-serif"
/>
<FrameLayout
android:layout_width=
"50dp"
android:layout_height=
"match_parent"
android:layout_weight=
"0"
android:layout_marginStart=
"20dp"
>
</FrameLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
app/src/main/res/values/strings.xml
View file @
f521bce9
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
<string
name=
"settings_reboot_toast"
>
Reboot to apply settings
</string>
<string
name=
"settings_reboot_toast"
>
Reboot to apply settings
</string>
<string
name=
"auto_detect"
>
"(Auto
Detect
) %1$s"
</string>
<string
name=
"auto_detect"
>
"(Auto) %1$s"
</string>
<string
name=
"boot_image_title"
>
Boot Image Location
</string>
<string
name=
"boot_image_title"
>
Boot Image Location
</string>
<string
name=
"detect_button"
>
Detect
</string>
<string
name=
"detect_button"
>
Detect
</string>
<string
name=
"advanced_settings_title"
>
Advanced Settings
</string>
<string
name=
"advanced_settings_title"
>
Advanced Settings
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment