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
595c7214
Commit
595c7214
authored
Dec 03, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dark theme to superuser request
parent
f3c3b5a6
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
263 additions
and
251 deletions
+263
-251
build.gradle
app/build.gradle
+1
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+0
-5
changelog.md
app/src/main/assets/changelog.md
+2
-1
AboutActivity.java
app/src/main/java/com/topjohnwu/magisk/AboutActivity.java
+5
-0
FlashActivity.java
app/src/main/java/com/topjohnwu/magisk/FlashActivity.java
+5
-0
MainActivity.java
app/src/main/java/com/topjohnwu/magisk/MainActivity.java
+5
-0
SettingsActivity.java
app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java
+5
-0
SplashActivity.java
app/src/main/java/com/topjohnwu/magisk/SplashActivity.java
+5
-0
Activity.java
...c/main/java/com/topjohnwu/magisk/components/Activity.java
+7
-3
RequestActivity.java
.../java/com/topjohnwu/magisk/superuser/RequestActivity.java
+220
-4
SuRequestActivity.java
...ava/com/topjohnwu/magisk/superuser/SuRequestActivity.java
+0
-234
activity_about.xml
app/src/main/res/layout/activity_about.xml
+1
-1
activity_request.xml
app/src/main/res/layout/activity_request.xml
+2
-1
styles.xml
app/src/main/res/values/styles.xml
+5
-1
No files found.
app/build.gradle
View file @
595c7214
...
...
@@ -8,7 +8,7 @@ android {
applicationId
"com.topjohnwu.magisk"
minSdkVersion
21
targetSdkVersion
27
versionCode
69
versionCode
70
versionName
"5.4.3"
ndk
{
moduleName
'zipadjust'
...
...
app/src/main/AndroidManifest.xml
View file @
595c7214
...
...
@@ -52,11 +52,6 @@
android:excludeFromRecents=
"true"
android:launchMode=
"singleTask"
android:taskAffinity=
"internal.superuser"
android:theme=
"@android:style/Theme.NoDisplay"
/>
<activity
android:name=
".superuser.SuRequestActivity"
android:excludeFromRecents=
"true"
android:taskAffinity=
"internal.superuser"
android:theme=
"@style/SuRequest"
/>
<receiver
android:name=
".superuser.SuReceiver"
/>
...
...
app/src/main/assets/changelog.md
View file @
595c7214
### v5.4.3 (
69
)
### v5.4.3 (
70
)
-
Fix dynamic resource loading, should prevent crashing when checking SafetyNet
-
Update SignAPK to use very little RAM, should expand old device support
-
Support settings migration after hiding Magisk Manager
-
Add reboot menu in modules section
-
Add changelog in app
-
Add dark theme to superuser requests
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/AboutActivity.java
View file @
595c7214
...
...
@@ -31,6 +31,11 @@ public class AboutActivity extends Activity {
@BindView
(
R
.
id
.
support_thread
)
AboutCardRow
supportThread
;
@BindView
(
R
.
id
.
donation
)
AboutCardRow
donation
;
@Override
public
int
getDarkTheme
()
{
return
R
.
style
.
AppTheme_Transparent_Dark
;
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
...
...
app/src/main/java/com/topjohnwu/magisk/FlashActivity.java
View file @
595c7214
...
...
@@ -75,6 +75,11 @@ public class FlashActivity extends Activity {
MagiskManager
.
toast
(
logFile
.
getPath
(),
Toast
.
LENGTH_LONG
);
}
@Override
public
int
getDarkTheme
()
{
return
R
.
style
.
AppTheme_Transparent_Dark
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
...
...
app/src/main/java/com/topjohnwu/magisk/MainActivity.java
View file @
595c7214
...
...
@@ -42,6 +42,11 @@ public class MainActivity extends Activity
private
float
toolbarElevation
;
@Override
public
int
getDarkTheme
()
{
return
R
.
style
.
AppTheme_Dark
;
}
@Override
protected
void
onCreate
(
final
Bundle
savedInstanceState
)
{
...
...
app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java
View file @
595c7214
...
...
@@ -35,6 +35,11 @@ public class SettingsActivity extends Activity implements Topic.Subscriber {
@BindView
(
R
.
id
.
toolbar
)
Toolbar
toolbar
;
@Override
public
int
getDarkTheme
()
{
return
R
.
style
.
AppTheme_Transparent_Dark
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
...
...
app/src/main/java/com/topjohnwu/magisk/SplashActivity.java
View file @
595c7214
...
...
@@ -25,6 +25,11 @@ import java.util.List;
public
class
SplashActivity
extends
Activity
{
@Override
public
int
getDarkTheme
()
{
return
-
1
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
...
...
app/src/main/java/com/topjohnwu/magisk/components/Activity.java
View file @
595c7214
...
...
@@ -9,6 +9,7 @@ import android.os.Bundle;
import
android.support.annotation.Keep
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.annotation.StyleRes
;
import
android.support.v7.app.AppCompatActivity
;
import
android.view.WindowManager
;
...
...
@@ -17,7 +18,7 @@ import com.topjohnwu.magisk.R;
import
com.topjohnwu.magisk.utils.Topic
;
import
com.topjohnwu.magisk.utils.Utils
;
public
class
Activity
extends
AppCompatActivity
{
public
abstract
class
Activity
extends
AppCompatActivity
{
private
AssetManager
swappedAssetManager
=
null
;
private
Resources
swappedResources
=
null
;
...
...
@@ -31,14 +32,17 @@ public class Activity extends AppCompatActivity {
applyOverrideConfiguration
(
configuration
);
}
@StyleRes
abstract
public
int
getDarkTheme
();
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
this
instanceof
Topic
.
Subscriber
)
{
((
Topic
.
Subscriber
)
this
).
subscribeTopics
();
}
if
(
getMagiskManager
().
isDarkTheme
)
{
setTheme
(
R
.
style
.
AppTheme_Dark
);
if
(
getMagiskManager
().
isDarkTheme
&&
getDarkTheme
()
>
0
)
{
setTheme
(
getDarkTheme
()
);
}
}
...
...
app/src/main/java/com/topjohnwu/magisk/superuser/RequestActivity.java
View file @
595c7214
package
com
.
topjohnwu
.
magisk
.
superuser
;
import
android.content.ContentValues
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.net.LocalSocket
;
import
android.net.LocalSocketAddress
;
import
android.os.Bundle
;
import
android.os.CountDownTimer
;
import
android.os.FileObserver
;
import
android.text.TextUtils
;
import
android.view.Window
;
import
android.widget.ArrayAdapter
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.asyncs.ParallelTask
;
import
com.topjohnwu.magisk.components.Activity
;
import
com.topjohnwu.magisk.container.Policy
;
import
com.topjohnwu.magisk.utils.Const
;
import
com.topjohnwu.magisk.utils.Utils
;
import
java.io.DataInputStream
;
import
java.io.IOException
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
public
class
RequestActivity
extends
Activity
{
@BindView
(
R
.
id
.
su_popup
)
LinearLayout
suPopup
;
@BindView
(
R
.
id
.
timeout
)
Spinner
timeout
;
@BindView
(
R
.
id
.
app_icon
)
ImageView
appIcon
;
@BindView
(
R
.
id
.
app_name
)
TextView
appNameView
;
@BindView
(
R
.
id
.
package_name
)
TextView
packageNameView
;
@BindView
(
R
.
id
.
grant_btn
)
Button
grant_btn
;
@BindView
(
R
.
id
.
deny_btn
)
Button
deny_btn
;
private
String
socketPath
;
private
LocalSocket
socket
;
private
PackageManager
pm
;
private
MagiskManager
mm
;
private
boolean
hasTimeout
;
private
Policy
policy
;
private
CountDownTimer
timer
;
@Override
public
int
getDarkTheme
()
{
return
R
.
style
.
SuRequest_Dark
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
supportRequestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
pm
=
getPackageManager
();
mm
=
Utils
.
getMagiskManager
(
this
);
Intent
intent
=
getIntent
();
if
(
intent
==
null
)
{
socketPath
=
intent
.
getStringExtra
(
"socket"
);
hasTimeout
=
intent
.
getBooleanExtra
(
"timeout"
,
true
);
new
FileObserver
(
socketPath
)
{
@Override
public
void
onEvent
(
int
fileEvent
,
String
path
)
{
if
(
fileEvent
==
FileObserver
.
DELETE_SELF
)
{
finish
();
}
}
}.
startWatching
();
new
SocketManager
(
this
).
exec
();
}
private
boolean
cancelTimeout
()
{
timer
.
cancel
();
deny_btn
.
setText
(
getString
(
R
.
string
.
deny
));
return
false
;
}
private
void
showRequest
()
{
switch
(
mm
.
suResponseType
)
{
case
Const
.
Value
.
SU_AUTO_DENY
:
handleAction
(
Policy
.
DENY
,
0
);
return
;
case
Const
.
Value
.
SU_AUTO_ALLOW
:
handleAction
(
Policy
.
ALLOW
,
0
);
return
;
case
Const
.
Value
.
SU_PROMPT
:
default
:
}
// If not interactive, response directly
if
(
policy
.
policy
!=
Policy
.
INTERACTIVE
)
{
handleAction
();
return
;
}
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
).
setClass
(
this
,
SuRequestActivity
.
class
);
startActivity
(
intent
);
setContentView
(
R
.
layout
.
activity_request
);
ButterKnife
.
bind
(
this
);
appIcon
.
setImageDrawable
(
policy
.
info
.
loadIcon
(
pm
));
appNameView
.
setText
(
policy
.
appName
);
packageNameView
.
setText
(
policy
.
packageName
);
ArrayAdapter
<
CharSequence
>
adapter
=
ArrayAdapter
.
createFromResource
(
this
,
R
.
array
.
allow_timeout
,
android
.
R
.
layout
.
simple_spinner_item
);
adapter
.
setDropDownViewResource
(
android
.
R
.
layout
.
simple_spinner_dropdown_item
);
timeout
.
setAdapter
(
adapter
);
timer
=
new
CountDownTimer
(
mm
.
suRequestTimeout
*
1000
,
1000
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
deny_btn
.
setText
(
getString
(
R
.
string
.
deny_with_str
,
"("
+
millisUntilFinished
/
1000
+
")"
));
}
@Override
public
void
onFinish
()
{
deny_btn
.
setText
(
getString
(
R
.
string
.
deny_with_str
,
"(0)"
));
handleAction
(
Policy
.
DENY
);
}
};
grant_btn
.
setOnClickListener
(
v
->
{
handleAction
(
Policy
.
ALLOW
);
timer
.
cancel
();
});
deny_btn
.
setOnClickListener
(
v
->
{
handleAction
(
Policy
.
DENY
);
timer
.
cancel
();
});
suPopup
.
setOnClickListener
(
v
->
cancelTimeout
());
timeout
.
setOnTouchListener
((
v
,
event
)
->
cancelTimeout
());
if
(
hasTimeout
)
{
timer
.
start
();
}
else
{
cancelTimeout
();
}
}
@Override
public
void
onBackPressed
()
{
if
(
policy
!=
null
)
{
handleAction
(
Policy
.
DENY
);
}
finish
();
}
void
handleAction
()
{
String
response
;
if
(
policy
.
policy
==
Policy
.
ALLOW
)
{
response
=
"socket:ALLOW"
;
}
else
{
response
=
"socket:DENY"
;
}
try
{
socket
.
getOutputStream
().
write
((
response
).
getBytes
());
socket
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finish
();
}
void
handleAction
(
int
action
)
{
handleAction
(
action
,
Const
.
Value
.
timeoutList
[
timeout
.
getSelectedItemPosition
()]);
}
void
handleAction
(
int
action
,
int
time
)
{
policy
.
policy
=
action
;
if
(
time
>=
0
)
{
policy
.
until
=
(
time
==
0
)
?
0
:
(
System
.
currentTimeMillis
()
/
1000
+
time
*
60
);
mm
.
suDB
.
addPolicy
(
policy
);
}
handleAction
();
}
private
class
SocketManager
extends
ParallelTask
<
Void
,
Void
,
Boolean
>
{
SocketManager
(
Activity
context
)
{
super
(
context
);
}
@Override
protected
Boolean
doInBackground
(
Void
...
params
)
{
try
{
socket
=
new
LocalSocket
();
socket
.
connect
(
new
LocalSocketAddress
(
socketPath
,
LocalSocketAddress
.
Namespace
.
FILESYSTEM
));
DataInputStream
is
=
new
DataInputStream
(
socket
.
getInputStream
());
ContentValues
payload
=
new
ContentValues
();
while
(
true
)
{
int
nameLen
=
is
.
readInt
();
byte
[]
nameBytes
=
new
byte
[
nameLen
];
is
.
readFully
(
nameBytes
);
String
name
=
new
String
(
nameBytes
);
if
(
TextUtils
.
equals
(
name
,
"eof"
))
break
;
int
dataLen
=
is
.
readInt
();
byte
[]
dataBytes
=
new
byte
[
dataLen
];
is
.
readFully
(
dataBytes
);
String
data
=
new
String
(
dataBytes
);
payload
.
put
(
name
,
data
);
}
if
(
payload
.
getAsInteger
(
"uid"
)
==
null
)
{
return
false
;
}
int
uid
=
payload
.
getAsInteger
(
"uid"
);
policy
=
mm
.
suDB
.
getPolicy
(
uid
);
if
(
policy
==
null
)
{
policy
=
new
Policy
(
uid
,
pm
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
return
true
;
}
@Override
protected
void
onPostExecute
(
Boolean
result
)
{
if
(
result
)
{
showRequest
();
}
else
{
finish
();
}
}
}
}
app/src/main/java/com/topjohnwu/magisk/superuser/SuRequestActivity.java
deleted
100644 → 0
View file @
f3c3b5a6
package
com
.
topjohnwu
.
magisk
.
superuser
;
import
android.content.ContentValues
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.net.LocalSocket
;
import
android.net.LocalSocketAddress
;
import
android.os.Bundle
;
import
android.os.CountDownTimer
;
import
android.os.FileObserver
;
import
android.text.TextUtils
;
import
android.view.Window
;
import
android.widget.ArrayAdapter
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.asyncs.ParallelTask
;
import
com.topjohnwu.magisk.components.Activity
;
import
com.topjohnwu.magisk.container.Policy
;
import
com.topjohnwu.magisk.utils.Const
;
import
java.io.DataInputStream
;
import
java.io.IOException
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
public
class
SuRequestActivity
extends
Activity
{
@BindView
(
R
.
id
.
su_popup
)
LinearLayout
suPopup
;
@BindView
(
R
.
id
.
timeout
)
Spinner
timeout
;
@BindView
(
R
.
id
.
app_icon
)
ImageView
appIcon
;
@BindView
(
R
.
id
.
app_name
)
TextView
appNameView
;
@BindView
(
R
.
id
.
package_name
)
TextView
packageNameView
;
@BindView
(
R
.
id
.
grant_btn
)
Button
grant_btn
;
@BindView
(
R
.
id
.
deny_btn
)
Button
deny_btn
;
private
String
socketPath
;
private
LocalSocket
socket
;
private
PackageManager
pm
;
private
MagiskManager
mm
;
private
boolean
hasTimeout
;
private
Policy
policy
;
private
CountDownTimer
timer
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
supportRequestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
pm
=
getPackageManager
();
mm
=
getMagiskManager
();
Intent
intent
=
getIntent
();
socketPath
=
intent
.
getStringExtra
(
"socket"
);
hasTimeout
=
intent
.
getBooleanExtra
(
"timeout"
,
true
);
new
FileObserver
(
socketPath
)
{
@Override
public
void
onEvent
(
int
fileEvent
,
String
path
)
{
if
(
fileEvent
==
FileObserver
.
DELETE_SELF
)
{
finish
();
}
}
}.
startWatching
();
new
SocketManager
(
this
).
exec
();
}
private
boolean
cancelTimeout
()
{
timer
.
cancel
();
deny_btn
.
setText
(
getString
(
R
.
string
.
deny
));
return
false
;
}
private
void
showRequest
()
{
switch
(
mm
.
suResponseType
)
{
case
Const
.
Value
.
SU_AUTO_DENY
:
handleAction
(
Policy
.
DENY
,
0
);
return
;
case
Const
.
Value
.
SU_AUTO_ALLOW
:
handleAction
(
Policy
.
ALLOW
,
0
);
return
;
case
Const
.
Value
.
SU_PROMPT
:
default
:
}
// If not interactive, response directly
if
(
policy
.
policy
!=
Policy
.
INTERACTIVE
)
{
handleAction
();
return
;
}
setContentView
(
R
.
layout
.
activity_request
);
ButterKnife
.
bind
(
this
);
appIcon
.
setImageDrawable
(
policy
.
info
.
loadIcon
(
pm
));
appNameView
.
setText
(
policy
.
appName
);
packageNameView
.
setText
(
policy
.
packageName
);
ArrayAdapter
<
CharSequence
>
adapter
=
ArrayAdapter
.
createFromResource
(
this
,
R
.
array
.
allow_timeout
,
android
.
R
.
layout
.
simple_spinner_item
);
adapter
.
setDropDownViewResource
(
android
.
R
.
layout
.
simple_spinner_dropdown_item
);
timeout
.
setAdapter
(
adapter
);
timer
=
new
CountDownTimer
(
mm
.
suRequestTimeout
*
1000
,
1000
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
deny_btn
.
setText
(
getString
(
R
.
string
.
deny_with_str
,
"("
+
millisUntilFinished
/
1000
+
")"
));
}
@Override
public
void
onFinish
()
{
deny_btn
.
setText
(
getString
(
R
.
string
.
deny_with_str
,
"(0)"
));
handleAction
(
Policy
.
DENY
);
}
};
grant_btn
.
setOnClickListener
(
v
->
{
handleAction
(
Policy
.
ALLOW
);
timer
.
cancel
();
});
deny_btn
.
setOnClickListener
(
v
->
{
handleAction
(
Policy
.
DENY
);
timer
.
cancel
();
});
suPopup
.
setOnClickListener
(
v
->
cancelTimeout
());
timeout
.
setOnTouchListener
((
v
,
event
)
->
cancelTimeout
());
if
(
hasTimeout
)
{
timer
.
start
();
}
else
{
cancelTimeout
();
}
}
@Override
public
void
onBackPressed
()
{
if
(
policy
!=
null
)
{
handleAction
(
Policy
.
DENY
);
}
finish
();
}
void
handleAction
()
{
String
response
;
if
(
policy
.
policy
==
Policy
.
ALLOW
)
{
response
=
"socket:ALLOW"
;
}
else
{
response
=
"socket:DENY"
;
}
try
{
socket
.
getOutputStream
().
write
((
response
).
getBytes
());
socket
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finish
();
}
void
handleAction
(
int
action
)
{
handleAction
(
action
,
Const
.
Value
.
timeoutList
[
timeout
.
getSelectedItemPosition
()]);
}
void
handleAction
(
int
action
,
int
time
)
{
policy
.
policy
=
action
;
if
(
time
>=
0
)
{
policy
.
until
=
(
time
==
0
)
?
0
:
(
System
.
currentTimeMillis
()
/
1000
+
time
*
60
);
mm
.
suDB
.
addPolicy
(
policy
);
}
handleAction
();
}
private
class
SocketManager
extends
ParallelTask
<
Void
,
Void
,
Boolean
>
{
SocketManager
(
Activity
context
)
{
super
(
context
);
}
@Override
protected
Boolean
doInBackground
(
Void
...
params
)
{
try
{
socket
=
new
LocalSocket
();
socket
.
connect
(
new
LocalSocketAddress
(
socketPath
,
LocalSocketAddress
.
Namespace
.
FILESYSTEM
));
DataInputStream
is
=
new
DataInputStream
(
socket
.
getInputStream
());
ContentValues
payload
=
new
ContentValues
();
while
(
true
)
{
int
nameLen
=
is
.
readInt
();
byte
[]
nameBytes
=
new
byte
[
nameLen
];
is
.
readFully
(
nameBytes
);
String
name
=
new
String
(
nameBytes
);
if
(
TextUtils
.
equals
(
name
,
"eof"
))
break
;
int
dataLen
=
is
.
readInt
();
byte
[]
dataBytes
=
new
byte
[
dataLen
];
is
.
readFully
(
dataBytes
);
String
data
=
new
String
(
dataBytes
);
payload
.
put
(
name
,
data
);
}
if
(
payload
.
getAsInteger
(
"uid"
)
==
null
)
{
return
false
;
}
int
uid
=
payload
.
getAsInteger
(
"uid"
);
policy
=
mm
.
suDB
.
getPolicy
(
uid
);
if
(
policy
==
null
)
{
policy
=
new
Policy
(
uid
,
pm
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
return
true
;
}
@Override
protected
void
onPostExecute
(
Boolean
result
)
{
if
(
result
)
{
showRequest
();
}
else
{
finish
();
}
}
}
}
app/src/main/res/layout/activity_about.xml
View file @
595c7214
...
...
@@ -42,7 +42,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_gravity=
"center_vertical"
android:src=
"@mipmap/ic_launcher"
/>
android:src=
"@mipmap/ic_launcher
_round
"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/activity_request.xml
View file @
595c7214
...
...
@@ -8,7 +8,8 @@
android:layout_width=
"wrap_content"
android:minWidth=
"350dp"
android:layout_gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:background=
"?attr/colorBackgroundFloating"
>
<TextView
android:text=
"@string/su_request_title"
...
...
app/src/main/res/values/styles.xml
View file @
595c7214
...
...
@@ -52,7 +52,11 @@
<style
name=
"SuRequest"
parent=
"Theme.AppCompat.Light.Dialog"
>
<item
name=
"android:windowCloseOnTouchOutside"
>
false
</item>
<item
name=
"android:colorBackground"
>
@color/su_request_background
</item>
<item
name=
"colorBackgroundFloating"
>
@color/su_request_background
</item>
</style>
<style
name=
"SuRequest.Dark"
parent=
"Theme.AppCompat.Dialog"
>
<item
name=
"android:windowCloseOnTouchOutside"
>
false
</item>
</style>
</resources>
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