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
d73127b1
Commit
d73127b1
authored
Jan 21, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge DonationActivity to AboutActivity
parent
00f4242f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
98 deletions
+70
-98
build.gradle
app/build.gradle
+1
-0
AndroidManifest.xml
app/src/full/AndroidManifest.xml
+1
-4
e.java
app/src/full/java/a/e.java
+2
-2
q.java
app/src/full/java/a/q.java
+0
-7
AboutActivity.java
app/src/full/java/com/topjohnwu/magisk/AboutActivity.java
+4
-0
ClassMap.java
app/src/full/java/com/topjohnwu/magisk/ClassMap.java
+1
-2
DonationActivity.java
app/src/full/java/com/topjohnwu/magisk/DonationActivity.java
+0
-45
MainActivity.java
app/src/full/java/com/topjohnwu/magisk/MainActivity.java
+0
-7
activity_about.xml
app/src/full/res/layout/activity_about.xml
+61
-25
drawer.xml
app/src/full/res/menu/drawer.xml
+0
-6
No files found.
app/build.gradle
View file @
d73127b1
...
@@ -65,6 +65,7 @@ dependencies {
...
@@ -65,6 +65,7 @@ dependencies {
def
androidXVersion
=
"1.0.0"
def
androidXVersion
=
"1.0.0"
implementation
'androidx.core:core:1.0.1'
implementation
'androidx.core:core:1.0.1'
fullImplementation
'androidx.constraintlayout:constraintlayout:1.1.3'
fullImplementation
'androidx.appcompat:appcompat:1.0.2'
fullImplementation
'androidx.appcompat:appcompat:1.0.2'
fullImplementation
"androidx.preference:preference:${androidXVersion}"
fullImplementation
"androidx.preference:preference:${androidXVersion}"
fullImplementation
"androidx.recyclerview:recyclerview:${androidXVersion}"
fullImplementation
"androidx.recyclerview:recyclerview:${androidXVersion}"
...
...
app/src/full/AndroidManifest.xml
View file @
d73127b1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<application
<application
android:name=
"a.
q
"
android:name=
"a.
e
"
android:theme=
"@style/AppTheme"
android:theme=
"@style/AppTheme"
android:usesCleartextTraffic=
"true"
android:usesCleartextTraffic=
"true"
tools:ignore=
"GoogleAppIndexingWarning"
>
tools:ignore=
"GoogleAppIndexingWarning"
>
...
@@ -33,9 +33,6 @@
...
@@ -33,9 +33,6 @@
<activity
<activity
android:name=
"a.d"
android:name=
"a.d"
android:theme=
"@style/AppTheme.NoDrawer"
/>
android:theme=
"@style/AppTheme.NoDrawer"
/>
<activity
android:name=
"a.e"
android:theme=
"@style/AppTheme.NoDrawer"
/>
<activity
<activity
android:name=
"a.f"
android:name=
"a.f"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:configChanges=
"keyboardHidden|orientation|screenSize"
...
...
app/src/full/java/a/e.java
View file @
d73127b1
package
a
;
package
a
;
import
com.topjohnwu.
magisk.DonationActivity
;
import
com.topjohnwu.
core.App
;
public
class
e
extends
DonationActivity
{
public
class
e
extends
App
{
/* stub */
/* stub */
}
}
app/src/full/java/a/q.java
deleted
100644 → 0
View file @
00f4242f
package
a
;
import
com.topjohnwu.core.App
;
public
class
q
extends
App
{
/* stub */
}
app/src/full/java/com/topjohnwu/magisk/AboutActivity.java
View file @
d73127b1
...
@@ -27,6 +27,8 @@ public class AboutActivity extends BaseActivity {
...
@@ -27,6 +27,8 @@ public class AboutActivity extends BaseActivity {
@BindView
(
R
.
id
.
app_source_code
)
AboutCardRow
appSourceCode
;
@BindView
(
R
.
id
.
app_source_code
)
AboutCardRow
appSourceCode
;
@BindView
(
R
.
id
.
support_thread
)
AboutCardRow
supportThread
;
@BindView
(
R
.
id
.
support_thread
)
AboutCardRow
supportThread
;
@BindView
(
R
.
id
.
follow_twitter
)
AboutCardRow
twitter
;
@BindView
(
R
.
id
.
follow_twitter
)
AboutCardRow
twitter
;
@BindView
(
R
.
id
.
paypal
)
AboutCardRow
paypal
;
@BindView
(
R
.
id
.
patreon
)
AboutCardRow
patreon
;
@Override
@Override
public
int
getDarkTheme
()
{
public
int
getDarkTheme
()
{
...
@@ -66,6 +68,8 @@ public class AboutActivity extends BaseActivity {
...
@@ -66,6 +68,8 @@ public class AboutActivity extends BaseActivity {
appSourceCode
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
SOURCE_CODE_URL
)));
appSourceCode
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
SOURCE_CODE_URL
)));
supportThread
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
XDA_THREAD
)));
supportThread
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
XDA_THREAD
)));
twitter
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
TWITTER_URL
)));
twitter
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
TWITTER_URL
)));
paypal
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
PAYPAL_URL
)));
patreon
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
PATREON_URL
)));
setFloating
();
setFloating
();
}
}
...
...
app/src/full/java/com/topjohnwu/magisk/ClassMap.java
View file @
d73127b1
...
@@ -14,11 +14,10 @@ public class ClassMap {
...
@@ -14,11 +14,10 @@ public class ClassMap {
private
static
Map
<
Class
,
Class
>
classMap
=
new
HashMap
<>();
private
static
Map
<
Class
,
Class
>
classMap
=
new
HashMap
<>();
static
{
static
{
classMap
.
put
(
App
.
class
,
a
.
q
.
class
);
classMap
.
put
(
App
.
class
,
a
.
e
.
class
);
classMap
.
put
(
MainActivity
.
class
,
a
.
b
.
class
);
classMap
.
put
(
MainActivity
.
class
,
a
.
b
.
class
);
classMap
.
put
(
SplashActivity
.
class
,
a
.
c
.
class
);
classMap
.
put
(
SplashActivity
.
class
,
a
.
c
.
class
);
classMap
.
put
(
AboutActivity
.
class
,
a
.
d
.
class
);
classMap
.
put
(
AboutActivity
.
class
,
a
.
d
.
class
);
classMap
.
put
(
DonationActivity
.
class
,
a
.
e
.
class
);
classMap
.
put
(
FlashActivity
.
class
,
a
.
f
.
class
);
classMap
.
put
(
FlashActivity
.
class
,
a
.
f
.
class
);
classMap
.
put
(
UpdateCheckService
.
class
,
a
.
g
.
class
);
classMap
.
put
(
UpdateCheckService
.
class
,
a
.
g
.
class
);
classMap
.
put
(
GeneralReceiver
.
class
,
a
.
h
.
class
);
classMap
.
put
(
GeneralReceiver
.
class
,
a
.
h
.
class
);
...
...
app/src/full/java/com/topjohnwu/magisk/DonationActivity.java
deleted
100644 → 0
View file @
00f4242f
package
com
.
topjohnwu
.
magisk
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
com.topjohnwu.core.Const
;
import
com.topjohnwu.magisk.components.AboutCardRow
;
import
com.topjohnwu.magisk.components.BaseActivity
;
import
com.topjohnwu.magisk.utils.AppUtils
;
import
androidx.annotation.Nullable
;
import
androidx.appcompat.app.ActionBar
;
import
androidx.appcompat.widget.Toolbar
;
import
butterknife.BindView
;
public
class
DonationActivity
extends
BaseActivity
{
@BindView
(
R
.
id
.
toolbar
)
Toolbar
toolbar
;
@BindView
(
R
.
id
.
paypal
)
AboutCardRow
paypal
;
@BindView
(
R
.
id
.
patreon
)
AboutCardRow
patreon
;
@Override
public
int
getDarkTheme
()
{
return
R
.
style
.
AppTheme_NoDrawer_Dark
;
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_donation
);
new
DonationActivity_ViewBinding
(
this
);
setSupportActionBar
(
toolbar
);
toolbar
.
setNavigationOnClickListener
(
view
->
finish
());
ActionBar
ab
=
getSupportActionBar
();
if
(
ab
!=
null
)
{
ab
.
setTitle
(
R
.
string
.
donation
);
ab
.
setDisplayHomeAsUpEnabled
(
true
);
}
paypal
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
PAYPAL_URL
)));
patreon
.
setOnClickListener
(
v
->
AppUtils
.
openLink
(
this
,
Uri
.
parse
(
Const
.
Url
.
PATREON_URL
)));
}
}
app/src/full/java/com/topjohnwu/magisk/MainActivity.java
View file @
d73127b1
...
@@ -158,9 +158,6 @@ public class MainActivity extends BaseActivity
...
@@ -158,9 +158,6 @@ public class MainActivity extends BaseActivity
case
"about"
:
case
"about"
:
itemId
=
R
.
id
.
app_about
;
itemId
=
R
.
id
.
app_about
;
break
;
break
;
case
"donation"
:
itemId
=
R
.
id
.
donation
;
break
;
}
}
}
}
navigate
(
itemId
);
navigate
(
itemId
);
...
@@ -197,10 +194,6 @@ public class MainActivity extends BaseActivity
...
@@ -197,10 +194,6 @@ public class MainActivity extends BaseActivity
startActivity
(
new
Intent
(
this
,
ClassMap
.
get
(
AboutActivity
.
class
)));
startActivity
(
new
Intent
(
this
,
ClassMap
.
get
(
AboutActivity
.
class
)));
mDrawerItem
=
bak
;
mDrawerItem
=
bak
;
break
;
break
;
case
R
.
id
.
donation
:
startActivity
(
new
Intent
(
this
,
ClassMap
.
get
(
DonationActivity
.
class
)));
mDrawerItem
=
bak
;
break
;
}
}
}
}
...
...
app/src/full/res/layout/activity_about.xml
View file @
d73127b1
<?xml version="1.0" encoding="utf-8"?>
<?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"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -7,8 +9,6 @@
...
@@ -7,8 +9,6 @@
<include
layout=
"@layout/toolbar"
/>
<include
layout=
"@layout/toolbar"
/>
<ScrollView
<ScrollView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"8dp"
android:padding=
"8dp"
...
@@ -21,38 +21,74 @@
...
@@ -21,38 +21,74 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<androidx.cardview.widget.CardView
<androidx.cardview.widget.CardView
android:id=
"@+id/cardView"
style=
"?attr/cardStyle"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
style=
"?attr/cardStyle"
app:cardUseCompatPadding=
"true"
>
app:cardUseCompatPadding=
"true"
>
<
Linear
Layout
<
androidx.constraintlayout.widget.Constraint
Layout
android:layout_width=
"
fill
_parent"
android:layout_width=
"
match
_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:layout_marginTop=
"5dp"
>
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"72dp"
android:orientation=
"horizontal"
android:padding=
"16dp"
>
<ImageView
<ImageView
app:srcCompat=
"@drawable/ic_logo
"
android:id=
"@+id/imageView
"
android:layout_width=
"72dp"
android:layout_width=
"72dp"
android:layout_height=
"match_parent"
android:layout_height=
"0dp"
android:layout_gravity=
"center_vertical"
/>
android:layout_marginTop=
"4dp"
android:layout_marginEnd=
"8dp"
android:layout_marginBottom=
"4dp"
app:layout_constraintBottom_toTopOf=
"@+id/paypal"
app:layout_constraintEnd_toStartOf=
"@+id/textView"
app:layout_constraintTop_toTopOf=
"@+id/textView"
app:srcCompat=
"@drawable/ic_logo"
/>
<TextView
<TextView
android:id=
"@+id/textView"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center_vertical"
android:paddingLeft=
"16
dp"
android:paddingTop=
"10
dp"
android:paddingRight=
"16
dp"
android:paddingBottom=
"10
dp"
android:text=
"@string/app_name"
android:text=
"@string/app_name"
android:textAppearance=
"@style/TextAppearance.AppCompat.Headline"
/>
android:textAppearance=
"@style/TextAppearance.AppCompat.Headline"
</LinearLayout>
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<a.l
android:id=
"@+id/paypal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:icon=
"@drawable/ic_paypal"
app:layout_constraintTop_toBottomOf=
"@+id/textView"
app:text=
"PayPal"
/>
<a.l
android:id=
"@+id/patreon"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:icon=
"@drawable/ic_patreon"
app:layout_constraintTop_toBottomOf=
"@+id/paypal"
app:text=
"Patreon"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
style=
"?attr/cardStyle"
app:cardUseCompatPadding=
"true"
>
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<a.l
<a.l
android:id=
"@+id/app_version_info"
android:id=
"@+id/app_version_info"
...
...
app/src/full/res/menu/drawer.xml
View file @
d73127b1
...
@@ -64,12 +64,6 @@
...
@@ -64,12 +64,6 @@
android:icon=
"@drawable/ic_info_outline"
android:icon=
"@drawable/ic_info_outline"
android:title=
"@string/about"
/>
android:title=
"@string/about"
/>
<item
android:checkable=
"false"
android:id=
"@+id/donation"
android:icon=
"@drawable/ic_attach_money"
android:title=
"@string/donation"
/>
</group>
</group>
</menu>
</menu>
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