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
6e48294f
Commit
6e48294f
authored
Jan 30, 2020
by
Viktor De Pasquale
Committed by
John Wu
Jan 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary files and merged styles
parent
dea607b1
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
13 additions
and
178 deletions
+13
-178
ConsoleRvItem.kt
...m/topjohnwu/magisk/model/entity/recycler/ConsoleRvItem.kt
+4
-8
SectionRvItem.kt
...m/topjohnwu/magisk/model/entity/recycler/SectionRvItem.kt
+0
-11
DataBindingAdapters.kt
...in/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt
+0
-20
item_console.xml
app/src/main/res/layout/item_console.xml
+0
-27
item_console_md2.xml
app/src/main/res/layout/item_console_md2.xml
+1
-1
item_section.xml
app/src/main/res/layout/item_section.xml
+0
-33
swicher_caption_variant.xml
app/src/main/res/layout/swicher_caption_variant.xml
+0
-10
styles.xml
app/src/main/res/values-night/styles.xml
+0
-4
styles.xml
app/src/main/res/values-v19/styles.xml
+0
-4
styles_md2.xml
app/src/main/res/values-v19/styles_md2.xml
+2
-0
styles.xml
app/src/main/res/values/styles.xml
+0
-5
styles_md2.xml
app/src/main/res/values/styles_md2.xml
+5
-0
styles_view_md2.xml
app/src/main/res/values/styles_view_md2.xml
+1
-1
view_card_styles.xml
app/src/main/res/values/view_card_styles.xml
+0
-9
view_dialog_styles.xml
app/src/main/res/values/view_dialog_styles.xml
+0
-11
view_divider_styles.xml
app/src/main/res/values/view_divider_styles.xml
+0
-18
view_progress_styles.xml
app/src/main/res/values/view_progress_styles.xml
+0
-10
view_styles.xml
app/src/main/res/values/view_styles.xml
+0
-6
No files found.
app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/ConsoleRvItem.kt
View file @
6e48294f
...
@@ -6,8 +6,8 @@ import androidx.databinding.ViewDataBinding
...
@@ -6,8 +6,8 @@ import androidx.databinding.ViewDataBinding
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
open
class
ConsoleRvItem
(
val
item
:
String
)
:
LenientRvItem
<
ConsoleRv
Item
>()
{
class
ConsoleItem
(
val
item
:
String
)
:
LenientRvItem
<
Console
Item
>()
{
override
val
layoutRes
:
Int
=
R
.
layout
.
item_console
override
val
layoutRes
=
R
.
layout
.
item_console_md2
override
fun
onBindingBound
(
binding
:
ViewDataBinding
,
recyclerView
:
RecyclerView
)
{
override
fun
onBindingBound
(
binding
:
ViewDataBinding
,
recyclerView
:
RecyclerView
)
{
val
view
=
binding
.
root
as
TextView
val
view
=
binding
.
root
as
TextView
...
@@ -21,10 +21,6 @@ open class ConsoleRvItem(val item: String) : LenientRvItem<ConsoleRvItem>() {
...
@@ -21,10 +21,6 @@ open class ConsoleRvItem(val item: String) : LenientRvItem<ConsoleRvItem>() {
}
}
}
}
override
fun
contentSameAs
(
other
:
ConsoleRvItem
)
=
itemSameAs
(
other
)
override
fun
contentSameAs
(
other
:
ConsoleItem
)
=
itemSameAs
(
other
)
override
fun
itemSameAs
(
other
:
ConsoleRvItem
)
=
item
==
other
.
item
override
fun
itemSameAs
(
other
:
ConsoleItem
)
=
item
==
other
.
item
}
class
ConsoleItem
(
item
:
String
)
:
ConsoleRvItem
(
item
)
{
override
val
layoutRes
=
R
.
layout
.
item_console_md2
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/SectionRvItem.kt
deleted
100644 → 0
View file @
dea607b1
package
com.topjohnwu.magisk.model.entity.recycler
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.ComparableRvItem
class
SectionRvItem
(
val
text
:
String
)
:
ComparableRvItem
<
SectionRvItem
>()
{
override
val
layoutRes
:
Int
=
R
.
layout
.
item_section
override
fun
contentSameAs
(
other
:
SectionRvItem
)
=
itemSameAs
(
other
)
override
fun
itemSameAs
(
other
:
SectionRvItem
)
=
text
==
other
.
text
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt
View file @
6e48294f
...
@@ -9,9 +9,7 @@ import android.view.View
...
@@ -9,9 +9,7 @@ import android.view.View
import
android.view.ViewAnimationUtils
import
android.view.ViewAnimationUtils
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.ProgressBar
import
android.widget.ProgressBar
import
android.widget.TextSwitcher
import
android.widget.TextView
import
android.widget.TextView
import
android.widget.ViewSwitcher
import
androidx.annotation.ColorInt
import
androidx.annotation.ColorInt
import
androidx.annotation.DrawableRes
import
androidx.annotation.DrawableRes
import
androidx.appcompat.widget.AppCompatImageView
import
androidx.appcompat.widget.AppCompatImageView
...
@@ -287,24 +285,6 @@ fun View.setOnSelectClickListener(listener: View.OnClickListener, resetTime: Lon
...
@@ -287,24 +285,6 @@ fun View.setOnSelectClickListener(listener: View.OnClickListener, resetTime: Lon
}
}
}
}
@BindingAdapter
(
"textCaptionVariant"
)
fun
TextSwitcher
.
setTextBinding
(
text
:
CharSequence
)
{
tag
as
?
ViewSwitcher
.
ViewFactory
?:
ViewSwitcher
.
ViewFactory
{
View
.
inflate
(
context
,
R
.
layout
.
swicher_caption_variant
,
null
)
}.
also
{
tag
=
it
setFactory
(
it
)
setInAnimation
(
context
,
R
.
anim
.
switcher_bottom_up
)
setOutAnimation
(
context
,
R
.
anim
.
switcher_center_up
)
}
val
currentText
=
(
currentView
as
?
TextView
)
?.
text
if
(
currentText
!=
text
)
{
setText
(
text
)
}
}
@BindingAdapter
(
@BindingAdapter
(
"android:layout_marginLeft"
,
"android:layout_marginLeft"
,
"android:layout_marginTop"
,
"android:layout_marginTop"
,
...
...
app/src/main/res/layout/item_console.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
>
<data>
<variable
name=
"item"
type=
"com.topjohnwu.magisk.model.entity.recycler.ConsoleRvItem"
/>
<!--no actions are required-->
<variable
name=
"viewModel"
type=
"Object"
/>
</data>
<TextView
android:focusable=
"true"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"monospace"
android:text=
"@{item.item}"
android:textSize=
"10sp"
tools:text=
"@tools:sample/lorem/random"
/>
</layout>
app/src/main/res/layout/item_console_md2.xml
View file @
6e48294f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<variable
<variable
name=
"item"
name=
"item"
type=
"com.topjohnwu.magisk.model.entity.recycler.Console
Rv
Item"
/>
type=
"com.topjohnwu.magisk.model.entity.recycler.ConsoleItem"
/>
<!--no actions are required-->
<!--no actions are required-->
<variable
<variable
...
...
app/src/main/res/layout/item_section.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
>
<data>
<variable
name=
"item"
type=
"com.topjohnwu.magisk.model.entity.recycler.SectionRvItem"
/>
<variable
name=
"viewModel"
type=
"Object"
/>
</data>
<!--Paddings are trimmed from default section title because recycler adds these paddings for us already-->
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/Widget.Text.SectionTitle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingStart=
"0dp"
android:paddingLeft=
"0dp"
android:paddingTop=
"@dimen/margin_generic"
android:paddingEnd=
"0dp"
android:paddingRight=
"0dp"
android:paddingBottom=
"0dp"
android:text=
"@{item.text}"
android:textAppearance=
"@style/TextAppearance.Emphasize"
tools:text=
"@string/update_available"
/>
</layout>
\ No newline at end of file
app/src/main/res/layout/swicher_caption_variant.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.AppCompatTextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools"
android:ellipsize=
"middle"
android:gravity=
"start|center_vertical"
android:singleLine=
"true"
tools:text=
"@string/magisk"
android:textAppearance=
"@style/AppearanceFoundation.Caption.Variant"
/>
\ No newline at end of file
app/src/main/res/values-night/styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
\ No newline at end of file
app/src/main/res/values-v19/styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"SplashTheme"
parent=
"SplashThemeBase.V19"
/>
</resources>
\ No newline at end of file
app/src/main/res/values-v19/styles_md2.xml
View file @
6e48294f
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<style
name=
"SplashTheme"
parent=
"SplashThemeBase.V19"
/>
<style
name=
"Foundation.Compat"
>
<style
name=
"Foundation.Compat"
>
<item
name=
"android:windowTranslucentNavigation"
>
true
</item>
<item
name=
"android:windowTranslucentNavigation"
>
true
</item>
<item
name=
"android:windowTranslucentStatus"
>
true
</item>
<item
name=
"android:windowTranslucentStatus"
>
true
</item>
...
...
app/src/main/res/values/styles.xml
deleted
100644 → 0
View file @
dea607b1
<resources>
<style
name=
"SplashTheme"
parent=
"SplashThemeBase"
/>
</resources>
app/src/main/res/values/styles_md2.xml
View file @
6e48294f
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<style
name=
"SplashTheme"
parent=
"SplashThemeBase"
/>
<style
name=
"Foundation"
parent=
"Theme.MaterialComponents.Light.NoActionBar"
>
<style
name=
"Foundation"
parent=
"Theme.MaterialComponents.Light.NoActionBar"
>
<item
name=
"android:windowBackground"
>
?colorSurface
</item>
<item
name=
"android:windowBackground"
>
?colorSurface
</item>
</style>
</style>
...
@@ -13,6 +15,9 @@
...
@@ -13,6 +15,9 @@
<style
name=
"WidgetFoundation"
parent=
"android:Widget"
/>
<style
name=
"WidgetFoundation"
parent=
"android:Widget"
/>
<!-- {@deprecated Use WidgetFoundation instead.} -->
<style
name=
"Widget"
parent=
"WidgetFoundation"
/>
<style
name=
"AppearanceFoundation"
>
<style
name=
"AppearanceFoundation"
>
<item
name=
"android:fontFamily"
>
@font/exo
</item>
<item
name=
"android:fontFamily"
>
@font/exo
</item>
</style>
</style>
...
...
app/src/main/res/values/styles_view_md2.xml
View file @
6e48294f
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<style
name=
"W"
parent=
"Widget"
/>
<style
name=
"W"
parent=
"
android:
Widget"
/>
<style
name=
"W.Home"
/>
<style
name=
"W.Home"
/>
...
...
app/src/main/res/values/view_card_styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Widget.Card"
parent=
"Widget.MaterialComponents.CardView"
>
<item
name=
"cardCornerRadius"
>
@dimen/radius_generic
</item>
<item
name=
"cardElevation"
>
0dp
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/view_dialog_styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Widget.DialogButton"
>
<item
name=
"android:background"
>
?attr/selectableItemBackground
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/view_divider_styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Widget.Divider"
>
<item
name=
"android:background"
>
@color/colorCardStrokeInverse
</item>
</style>
<style
name=
"Widget.Divider.Horizontal"
>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_height"
>
1dp
</item>
</style>
<style
name=
"Widget.Divider.Vertical"
>
<item
name=
"android:layout_width"
>
1dp
</item>
<item
name=
"android:layout_height"
>
0dp
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/view_progress_styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Widget.Progress"
parent=
"Widget.AppCompat.ProgressBar.Horizontal"
>
<item
name=
"android:indeterminate"
>
true
</item>
<item
name=
"android:layout_width"
>
64dp
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/view_styles.xml
deleted
100644 → 0
View file @
dea607b1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Widget"
/>
</resources>
\ No newline at end of file
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