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
df3a37b0
Commit
df3a37b0
authored
Oct 26, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated developer section to be horizontally scrollable instead of vertically
In order to make room for more information
parent
5f4718cd
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
175 additions
and
216 deletions
+175
-216
HomeItems.kt
...a/com/topjohnwu/magisk/model/entity/recycler/HomeItems.kt
+48
-1
HomeFragment.kt
...n/java/com/topjohnwu/magisk/redesign/home/HomeFragment.kt
+8
-0
HomeViewModel.kt
.../java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt
+5
-6
fragment_home_md2.xml
app/src/main/res/layout/fragment_home_md2.xml
+15
-181
item_developer.xml
app/src/main/res/layout/item_developer.xml
+49
-28
item_developer_link.xml
app/src/main/res/layout/item_developer_link.xml
+48
-0
strings_md2.xml
app/src/main/res/values/strings_md2.xml
+2
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/HomeItems.kt
View file @
df3a37b0
...
@@ -10,7 +10,7 @@ sealed class HomeItem : ComparableRvItem<HomeItem>() {
...
@@ -10,7 +10,7 @@ sealed class HomeItem : ComparableRvItem<HomeItem>() {
abstract
val
title
:
Int
abstract
val
title
:
Int
abstract
val
link
:
String
abstract
val
link
:
String
override
val
layoutRes
=
R
.
layout
.
item_developer
override
val
layoutRes
=
R
.
layout
.
item_developer
_link
override
fun
contentSameAs
(
other
:
HomeItem
)
=
itemSameAs
(
other
)
override
fun
contentSameAs
(
other
:
HomeItem
)
=
itemSameAs
(
other
)
override
fun
itemSameAs
(
other
:
HomeItem
)
=
this
==
other
override
fun
itemSameAs
(
other
:
HomeItem
)
=
this
==
other
...
@@ -20,6 +20,9 @@ sealed class HomeItem : ComparableRvItem<HomeItem>() {
...
@@ -20,6 +20,9 @@ sealed class HomeItem : ComparableRvItem<HomeItem>() {
return
icon
==
other
.
icon
&&
title
==
other
.
title
&&
link
==
other
.
link
return
icon
==
other
.
icon
&&
title
==
other
.
title
&&
link
==
other
.
link
}
}
override
fun
hashCode
()
=
icon
.
hashCode
()
+
title
.
hashCode
()
+
link
.
hashCode
()
+
layoutRes
.
hashCode
()
// region Children
// region Children
sealed
class
PayPal
:
HomeItem
()
{
sealed
class
PayPal
:
HomeItem
()
{
override
val
icon
=
R
.
drawable
.
ic_paypal
override
val
icon
=
R
.
drawable
.
ic_paypal
...
@@ -72,3 +75,47 @@ sealed class HomeItem : ComparableRvItem<HomeItem>() {
...
@@ -72,3 +75,47 @@ sealed class HomeItem : ComparableRvItem<HomeItem>() {
}
}
// endregion
// endregion
}
}
sealed
class
DeveloperItem
:
ComparableRvItem
<
DeveloperItem
>()
{
abstract
val
items
:
List
<
HomeItem
>
abstract
val
icon
:
Int
abstract
val
name
:
Int
override
val
layoutRes
=
R
.
layout
.
item_developer
override
fun
contentSameAs
(
other
:
DeveloperItem
)
=
itemSameAs
(
other
)
override
fun
itemSameAs
(
other
:
DeveloperItem
)
=
this
==
other
override
fun
equals
(
other
:
Any
?):
Boolean
{
if
(
other
!
is
DeveloperItem
)
return
false
return
icon
==
other
.
icon
&&
name
==
other
.
name
&&
items
==
other
.
items
}
override
fun
hashCode
()
=
icon
.
hashCode
()
+
name
.
hashCode
()
+
items
.
hashCode
()
+
layoutRes
.
hashCode
()
//region Children
object
Mainline
:
DeveloperItem
()
{
override
val
items
=
listOf
(
HomeItem
.
PayPal
.
Mainline
,
HomeItem
.
Patreon
,
HomeItem
.
Twitter
.
Mainline
)
override
val
icon
=
R
.
drawable
.
ic_mainline_dev
override
val
name
=
R
.
string
.
home_links_mainline
}
object
App
:
DeveloperItem
()
{
override
val
items
=
listOf
(
HomeItem
.
PayPal
.
App
,
HomeItem
.
Twitter
.
App
)
override
val
icon
=
R
.
drawable
.
ic_mainline_dev
override
val
name
=
R
.
string
.
home_links_app
}
object
Project
:
DeveloperItem
()
{
override
val
items
=
listOf
(
HomeItem
.
Github
,
HomeItem
.
Xda
)
override
val
icon
=
R
.
drawable
.
ic_project
override
val
name
=
R
.
string
.
home_links_project
}
//endregion
}
app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeFragment.kt
View file @
df3a37b0
package
com.topjohnwu.magisk.redesign.home
package
com.topjohnwu.magisk.redesign.home
import
android.graphics.Insets
import
android.graphics.Insets
import
android.os.Bundle
import
android.view.View
import
androidx.recyclerview.widget.LinearSnapHelper
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
...
@@ -17,4 +20,9 @@ class HomeFragment : CompatFragment<HomeViewModel, FragmentHomeMd2Binding>() {
...
@@ -17,4 +20,9 @@ class HomeFragment : CompatFragment<HomeViewModel, FragmentHomeMd2Binding>() {
super
.
onStart
()
super
.
onStart
()
activity
.
title
=
resources
.
getString
(
R
.
string
.
section_home
)
activity
.
title
=
resources
.
getString
(
R
.
string
.
section_home
)
}
}
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
LinearSnapHelper
().
attachToRecyclerView
(
binding
.
homeSupportList
)
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt
View file @
df3a37b0
...
@@ -13,6 +13,7 @@ import com.topjohnwu.magisk.model.entity.ManagerJson
...
@@ -13,6 +13,7 @@ import com.topjohnwu.magisk.model.entity.ManagerJson
import
com.topjohnwu.magisk.model.entity.UpdateInfo
import
com.topjohnwu.magisk.model.entity.UpdateInfo
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject.Magisk
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject.Magisk
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject.Manager
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject.Manager
import
com.topjohnwu.magisk.model.entity.recycler.DeveloperItem
import
com.topjohnwu.magisk.model.entity.recycler.HomeItem
import
com.topjohnwu.magisk.model.entity.recycler.HomeItem
import
com.topjohnwu.magisk.model.events.OpenInappLinkEvent
import
com.topjohnwu.magisk.model.events.OpenInappLinkEvent
import
com.topjohnwu.magisk.model.events.dialog.EnvFixDialog
import
com.topjohnwu.magisk.model.events.dialog.EnvFixDialog
...
@@ -67,15 +68,13 @@ class HomeViewModel(
...
@@ -67,15 +68,13 @@ class HomeViewModel(
}
}
}
}
val
itemsMainline
=
val
items
=
listOf
(
DeveloperItem
.
Mainline
,
DeveloperItem
.
App
,
DeveloperItem
.
Project
)
listOf
(
HomeItem
.
PayPal
.
Mainline
,
HomeItem
.
Patreon
,
HomeItem
.
Twitter
.
Mainline
)
val
itemsApp
=
listOf
(
HomeItem
.
PayPal
.
App
,
HomeItem
.
Twitter
.
App
)
val
itemsProject
=
listOf
(
HomeItem
.
Github
,
HomeItem
.
Xda
)
val
itemBinding
=
itemBindingOf
<
HomeItem
>
{
val
itemBinding
=
itemBindingOf
<
HomeItem
>
{
it
.
bindExtra
(
BR
.
viewModel
,
this
)
it
.
bindExtra
(
BR
.
viewModel
,
this
)
}
}
val
itemDeveloperBinding
=
itemBindingOf
<
DeveloperItem
>
{
it
.
bindExtra
(
BR
.
viewModel
,
this
)
}
private
var
shownDialog
=
false
private
var
shownDialog
=
false
...
...
app/src/main/res/layout/fragment_home_md2.xml
View file @
df3a37b0
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
<data>
<data>
<import
type=
"com.topjohnwu.magisk.R"
/>
<import
type=
"com.topjohnwu.magisk.Info"
/>
<import
type=
"com.topjohnwu.magisk.Info"
/>
<import
type=
"com.topjohnwu.magisk.BuildConfig"
/>
<import
type=
"com.topjohnwu.magisk.BuildConfig"
/>
...
@@ -29,9 +31,7 @@
...
@@ -29,9 +31,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
android:orientation=
"vertical"
android:orientation=
"vertical"
>
android:paddingStart=
"@dimen/l1"
android:paddingEnd=
"@dimen/l1"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -272,187 +272,21 @@
...
@@ -272,187 +272,21 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/l2"
>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/support_icon_mainline"
style=
"?styleIconNormal"
android:padding=
"@dimen/l_50"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_mainline_dev"
/>
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/l1"
app:layout_constrainedWidth=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0"
app:layout_constraintStart_toEndOf=
"@+id/support_icon_mainline"
app:layout_constraintTop_toTopOf=
"parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:padding=
"@dimen/l1"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"\@topjohnwu"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
<androidx.recyclerview.widget.RecyclerView
itemBinding=
"@{viewModel.itemBinding}"
items=
"@{viewModel.itemsMainline}"
nestedScrollingEnabled=
"@{false}"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:fadingEdgeLength=
"@dimen/l1"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/l1"
android:requiresFadingEdge=
"horizontal"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem=
"@layout/item_developer"
/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/l1"
>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/support_icon_app"
style=
"?styleIconNormal"
android:padding=
"@dimen/l_50"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_app_dev"
/>
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/l1"
app:layout_constrainedWidth=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/support_icon_app"
app:layout_constraintHorizontal_bias=
"1"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:padding=
"@dimen/l1"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end"
android:text=
"\@diareuse"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
itemBinding=
"@{viewModel.itemBinding}"
android:id=
"@+id/home_support_list"
items=
"@{viewModel.itemsApp}"
dividerHorizontal=
"@{R.drawable.divider_l1}"
nestedScrollingEnabled=
"@{false}"
itemBinding=
"@{viewModel.itemDeveloperBinding}"
android:layout_width=
"wrap_content"
items=
"@{viewModel.items}"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:fadingEdgeLength=
"@dimen/l1"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/l1"
android:requiresFadingEdge=
"horizontal"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
app:reverseLayout=
"true"
tools:listitem=
"@layout/item_developer"
/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/l1"
>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/support_icon_common"
style=
"?styleIconNormal"
android:padding=
"@dimen/l_50"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_project"
/>
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/l1"
app:layout_constrainedWidth=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0"
app:layout_constraintStart_toEndOf=
"@+id/support_icon_common"
app:layout_constraintTop_toTopOf=
"parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:layout_marginTop=
"@dimen/l2"
android:padding=
"@dimen/l1"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/home_links_project"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
/>
<androidx.recyclerview.widget.RecyclerView
itemBinding=
"@{viewModel.itemBinding}"
items=
"@{viewModel.itemsProject}"
nestedScrollingEnabled=
"@{false}"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
android:fadingEdgeLength=
"@dimen/l1"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingTop
=
"@dimen/l1"
android:paddingStart
=
"@dimen/l1"
android:requiresFadingEdge=
"horizontal
"
android:paddingEnd=
"@dimen/l1
"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem=
"@layout/item_developer"
/>
tools:listitem=
"@layout/item_developer"
/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/item_developer.xml
View file @
df3a37b0
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<variable
<variable
name=
"item"
name=
"item"
type=
"com.topjohnwu.magisk.model.entity.recycler.
Home
Item"
/>
type=
"com.topjohnwu.magisk.model.entity.recycler.
Developer
Item"
/>
<variable
<variable
name=
"viewModel"
name=
"viewModel"
...
@@ -18,41 +18,62 @@
...
@@ -18,41 +18,62 @@
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"?selectableItemBackground"
tools:layout_gravity=
"center|start"
>
android:onClick=
"@{() -> viewModel.onLinkPressed(item.link)}"
tools:layout_gravity=
"center"
android:padding=
"@dimen/l_50"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/developer_
link
"
android:id=
"@+id/developer_
icon
"
style=
"?styleI
mage
Normal"
style=
"?styleI
con
Normal"
a
pp:tint=
"?colorOnSurface
"
a
ndroid:padding=
"@dimen/l_50
"
app:layout_constraint
End_toEnd
Of=
"parent"
app:layout_constraint
Bottom_toBottom
Of=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@{item.icon}"
app:srcCompat=
"@{item.icon}"
tools:srcCompat=
"@drawable/ic_paypal"
/>
app:layout_constraintTop_toTopOf=
"parent"
tools:srcCompat=
"@drawable/ic_mainline_dev"
/>
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/l1"
app:layout_constrainedWidth=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0"
app:layout_constraintStart_toEndOf=
"@+id/developer_icon"
app:layout_constraintTop_toTopOf=
"parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:padding=
"@dimen/l1"
>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/developer_link_name"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/l_50"
android:text=
"@{item.name}"
android:text=
"@{item.title}"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
tools:text=
"\@topjohnwu"
/>
app:layout_constraintTop_toBottomOf=
"@+id/developer_link"
tools:text=
"Paypal"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.recyclerview.widget.RecyclerView
style=
"?styleImageSmall"
itemBinding=
"@{viewModel.itemBinding}"
android:layout_height=
"14sp"
items=
"@{item.items}"
app:layout_constraintBottom_toBottomOf=
"@+id/developer_link_name"
nestedScrollingEnabled=
"@{false}"
app:layout_constraintStart_toEndOf=
"@+id/developer_link_name"
android:layout_width=
"wrap_content"
app:layout_constraintTop_toTopOf=
"@+id/developer_link_name"
android:layout_height=
"wrap_content"
app:srcCompat=
"@drawable/ic_more"
android:clipToPadding=
"false"
app:tint=
"?colorTextTransient"
/>
android:fadingEdgeLength=
"@dimen/l1"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/l_50"
android:requiresFadingEdge=
"horizontal"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount=
"3"
tools:listitem=
"@layout/item_developer_link"
/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
app/src/main/res/layout/item_developer_link.xml
0 → 100644
View file @
df3a37b0
<?xml version="1.0" encoding="utf-8"?>
<layout
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"
>
<data>
<variable
name=
"item"
type=
"com.topjohnwu.magisk.model.entity.recycler.HomeItem"
/>
<variable
name=
"viewModel"
type=
"com.topjohnwu.magisk.redesign.home.HomeViewModel"
/>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"?selectableItemBackground"
android:onClick=
"@{() -> viewModel.onLinkPressed(item.link)}"
android:padding=
"@dimen/l_50"
tools:layout_gravity=
"center"
>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/developer_link"
style=
"?styleImageSmall"
app:layout_constraintEnd_toStartOf=
"@+id/developer_more"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@{item.icon}"
app:tint=
"?colorOnSurface"
tools:srcCompat=
"@drawable/ic_paypal"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/developer_more"
style=
"?styleImageSmall"
android:layout_height=
"14sp"
app:layout_constraintBottom_toBottomOf=
"@+id/developer_link"
app:layout_constraintStart_toEndOf=
"@+id/developer_link"
app:layout_constraintTop_toTopOf=
"@+id/developer_link"
app:srcCompat=
"@drawable/ic_more"
app:tint=
"?colorTextTransient"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/values/strings_md2.xml
View file @
df3a37b0
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
<string
name=
"obsolete_md2"
>
can be updated!
</string>
<string
name=
"obsolete_md2"
>
can be updated!
</string>
<string
name=
"loading_md2"
>
is loading…
</string>
<string
name=
"loading_md2"
>
is loading…
</string>
<string
name=
"home_links_mainline"
>
\@topjohnwu
</string>
<string
name=
"home_links_app"
>
\@diareuse
</string>
<string
name=
"home_links_project"
>
Project links
</string>
<string
name=
"home_links_project"
>
Project links
</string>
<string
name=
"home_item_paypal"
>
PayPal
</string>
<string
name=
"home_item_paypal"
>
PayPal
</string>
<string
name=
"home_item_patreon"
>
Patreon
</string>
<string
name=
"home_item_patreon"
>
Patreon
</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