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
823b121c
Commit
823b121c
authored
Oct 05, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support section content
parent
149d35c6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
179 additions
and
22 deletions
+179
-22
HomeItems.kt
...a/com/topjohnwu/magisk/model/entity/recycler/HomeItems.kt
+74
-0
HomeViewModel.kt
.../java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt
+24
-1
bg_selectable.xml
app/src/main/res/drawable-v21/bg_selectable.xml
+10
-0
bg_selectable.xml
app/src/main/res/drawable/bg_selectable.xml
+14
-0
fragment_home_md2.xml
app/src/main/res/layout/fragment_home_md2.xml
+25
-14
item_developer.xml
app/src/main/res/layout/item_developer.xml
+18
-3
dimens.xml
app/src/main/res/values/dimens.xml
+2
-0
strings_md2.xml
app/src/main/res/values/strings_md2.xml
+7
-0
styles_md2.xml
app/src/main/res/values/styles_md2.xml
+1
-0
styles_md2_impl.xml
app/src/main/res/values/styles_md2_impl.xml
+4
-4
No files found.
app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/HomeItems.kt
0 → 100644
View file @
823b121c
package
com.topjohnwu.magisk.model.entity.recycler
import
com.skoumal.teanity.databinding.ComparableRvItem
import
com.topjohnwu.magisk.Const
import
com.topjohnwu.magisk.R
sealed
class
HomeItem
:
ComparableRvItem
<
HomeItem
>()
{
abstract
val
icon
:
Int
abstract
val
title
:
Int
abstract
val
link
:
String
override
val
layoutRes
=
R
.
layout
.
item_developer
override
fun
contentSameAs
(
other
:
HomeItem
)
=
itemSameAs
(
other
)
override
fun
itemSameAs
(
other
:
HomeItem
)
=
this
==
other
override
fun
equals
(
other
:
Any
?):
Boolean
{
if
(
other
!
is
HomeItem
)
return
false
return
icon
==
other
.
icon
&&
title
==
other
.
title
&&
link
==
other
.
link
}
// region Children
sealed
class
PayPal
:
HomeItem
()
{
override
val
icon
=
R
.
drawable
.
ic_paypal
override
val
title
=
R
.
string
.
home_item_paypal
override
val
link
=
"https://paypal.me/%s"
// region Children
object
App
:
PayPal
()
{
override
val
link
=
super
.
link
.
format
(
"diareuse"
)
}
object
Mainline
:
PayPal
()
{
override
val
link
=
super
.
link
.
format
(
"topjohnwu"
)
}
// endregion
}
object
Patreon
:
HomeItem
()
{
override
val
icon
=
R
.
drawable
.
ic_patreon
override
val
title
=
R
.
string
.
home_item_patreon
override
val
link
=
Const
.
Url
.
PATREON_URL
}
sealed
class
Twitter
:
HomeItem
()
{
override
val
icon
=
R
.
drawable
.
ic_twitter
override
val
title
=
R
.
string
.
home_item_twitter
override
val
link
=
"https://twitter.com/%s"
// region Children
object
App
:
Twitter
()
{
override
val
link
=
super
.
link
.
format
(
"diareuse"
)
}
object
Mainline
:
Twitter
()
{
override
val
link
=
super
.
link
.
format
(
"topjohnwu"
)
}
// endregion
}
object
Github
:
HomeItem
()
{
override
val
icon
=
R
.
drawable
.
ic_github
override
val
title
=
R
.
string
.
home_item_source
override
val
link
=
Const
.
Url
.
SOURCE_CODE_URL
}
object
Xda
:
HomeItem
()
{
override
val
icon
=
R
.
drawable
.
ic_xda
override
val
title
=
R
.
string
.
home_item_xda
override
val
link
=
Const
.
Url
.
XDA_THREAD
}
// endregion
}
app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt
View file @
823b121c
package
com.topjohnwu.magisk.redesign.home
package
com.topjohnwu.magisk.redesign.home
import
com.skoumal.teanity.databinding.ComparableRvItem
import
com.skoumal.teanity.extensions.subscribeK
import
com.skoumal.teanity.extensions.subscribeK
import
com.skoumal.teanity.util.KObservableField
import
com.skoumal.teanity.util.KObservableField
import
com.topjohnwu.magisk.BuildConfig
import
com.topjohnwu.magisk.BuildConfig
...
@@ -10,9 +11,13 @@ import com.topjohnwu.magisk.extensions.res
...
@@ -10,9 +11,13 @@ import com.topjohnwu.magisk.extensions.res
import
com.topjohnwu.magisk.model.entity.MagiskJson
import
com.topjohnwu.magisk.model.entity.MagiskJson
import
com.topjohnwu.magisk.model.entity.ManagerJson
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.recycler.HomeItem
import
com.topjohnwu.magisk.model.observer.Observer
import
com.topjohnwu.magisk.model.observer.Observer
import
com.topjohnwu.magisk.redesign.compat.CompatViewModel
import
com.topjohnwu.magisk.redesign.compat.CompatViewModel
import
com.topjohnwu.magisk.ui.home.MagiskState
import
com.topjohnwu.magisk.ui.home.MagiskState
import
me.tatarka.bindingcollectionadapter2.BR
import
me.tatarka.bindingcollectionadapter2.ItemBinding
import
me.tatarka.bindingcollectionadapter2.OnItemBind
class
HomeViewModel
(
class
HomeViewModel
(
private
val
repoMagisk
:
MagiskRepository
private
val
repoMagisk
:
MagiskRepository
...
@@ -37,6 +42,16 @@ class HomeViewModel(
...
@@ -37,6 +42,16 @@ class HomeViewModel(
}
}
}
}
val
itemsMainline
=
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
>
{
it
.
bindExtra
(
BR
.
viewModel
,
this
)
}
override
fun
refresh
()
=
repoMagisk
.
fetchUpdate
()
override
fun
refresh
()
=
repoMagisk
.
fetchUpdate
()
.
subscribeK
{
updateBy
(
it
)
}
.
subscribeK
{
updateBy
(
it
)
}
...
@@ -55,6 +70,7 @@ class HomeViewModel(
...
@@ -55,6 +70,7 @@ class HomeViewModel(
}
}
fun
onDeletePressed
()
{}
fun
onDeletePressed
()
{}
fun
onLinkPressed
(
link
:
String
)
{}
}
}
...
@@ -66,4 +82,11 @@ val MagiskJson.isObsolete
...
@@ -66,4 +82,11 @@ val MagiskJson.isObsolete
val
ManagerJson
.
isUpdateChannelCorrect
val
ManagerJson
.
isUpdateChannelCorrect
get
()
=
versionCode
>
0
get
()
=
versionCode
>
0
val
ManagerJson
.
isObsolete
val
ManagerJson
.
isObsolete
get
()
=
BuildConfig
.
VERSION_CODE
<
versionCode
get
()
=
BuildConfig
.
VERSION_CODE
<
versionCode
\ No newline at end of file
inline
fun
<
T
:
ComparableRvItem
<
T
>
>
itemBindingOf
(
crossinline
body
:
(
ItemBinding
<*>)
->
Unit
=
{}
)
=
OnItemBind
<
T
>
{
itemBinding
,
_
,
item
->
item
.
bind
(
itemBinding
)
body
(
itemBinding
)
}
\ No newline at end of file
app/src/main/res/drawable-v21/bg_selectable.xml
0 → 100644
View file @
823b121c
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:color=
"?colorPrimary"
>
<item
android:id=
"@android:id/mask"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"?colorPrimary"
/>
</shape>
</item>
</ripple>
\ No newline at end of file
app/src/main/res/drawable/bg_selectable.xml
0 → 100644
View file @
823b121c
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"?colorPrimaryVariant"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
</item>
</selector>
\ No newline at end of file
app/src/main/res/layout/fragment_home_md2.xml
View file @
823b121c
...
@@ -208,8 +208,8 @@
...
@@ -208,8 +208,8 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_height=
"1dp"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginEnd=
"@dimen/l1"
android:layout_marginTop=
"@dimen/l2"
android:layout_marginTop=
"@dimen/l2"
android:layout_marginEnd=
"@dimen/l1"
android:layout_marginBottom=
"@dimen/l2"
android:layout_marginBottom=
"@dimen/l2"
android:background=
"?colorSurfaceVariant"
/>
android:background=
"?colorSurfaceVariant"
/>
...
@@ -229,11 +229,13 @@
...
@@ -229,11 +229,13 @@
<com.google.android.material.card.MaterialCardView
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
style=
"?styleCardNormal"
android:layout_width=
"
0dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginStart=
"@dimen/l1"
app:layout_constrainedWidth=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0"
app:layout_constraintStart_toEndOf=
"@+id/support_icon_john"
app:layout_constraintStart_toEndOf=
"@+id/support_icon_john"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintTop_toTopOf=
"parent"
>
...
@@ -246,16 +248,18 @@
...
@@ -246,16 +248,18 @@
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
fontFamily=
"sans-serif-black
"
android:
text=
"\@topjohnwu
"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
android:textStyle=
"bold"
tools:
text=
"\@topjohnwu
"
/>
tools:
ignore=
"HardcodedText
"
/>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:layout_width=
"match_parent
"
itemBinding=
"@{viewModel.itemBinding}
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
android:fadingEdgeLength=
"@dimen/l1"
android:fadingEdgeLength=
"@dimen/l1"
items=
"@{viewModel.itemsMainline}"
android:layout_width=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/l1"
android:paddingTop=
"@dimen/l1"
android:requiresFadingEdge=
"horizontal"
android:requiresFadingEdge=
"horizontal"
...
@@ -271,8 +275,7 @@
...
@@ -271,8 +275,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/l1"
android:layout_marginTop=
"@dimen/l1"
>
tools:visibility=
"gone"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/support_icon_dia"
android:id=
"@+id/support_icon_dia"
...
@@ -286,8 +289,10 @@
...
@@ -286,8 +289,10 @@
<com.google.android.material.card.MaterialCardView
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
style=
"?styleCardNormal"
android:layout_width=
"
0dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:layout_constrainedWidth=
"true"
app:layout_constraintHorizontal_bias=
"1"
android:layout_marginEnd=
"@dimen/l1"
android:layout_marginEnd=
"@dimen/l1"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/support_icon_dia"
app:layout_constraintEnd_toStartOf=
"@+id/support_icon_dia"
...
@@ -304,15 +309,17 @@
...
@@ -304,15 +309,17 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end"
android:layout_gravity=
"end"
android:fontFamily=
"sans-serif-black"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
android:textStyle=
"bold"
tools:text=
"\@diareuse"
/>
android:text=
"\@diareuse"
tools:ignore=
"HardcodedText"
/>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:layout_width=
"match_parent
"
itemBinding=
"@{viewModel.itemBinding}
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
items=
"@{viewModel.itemsApp}"
android:layout_width=
"wrap_content"
android:fadingEdgeLength=
"@dimen/l1"
android:fadingEdgeLength=
"@dimen/l1"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/l1"
android:paddingTop=
"@dimen/l1"
...
@@ -350,9 +357,11 @@
...
@@ -350,9 +357,11 @@
<com.google.android.material.card.MaterialCardView
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
style=
"?styleCardNormal"
android:layout_width=
"
0dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginStart=
"@dimen/l1"
app:layout_constrainedWidth=
"true"
app:layout_constraintHorizontal_bias=
"0"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/support_icon_common"
app:layout_constraintStart_toEndOf=
"@+id/support_icon_common"
...
@@ -370,13 +379,15 @@
...
@@ -370,13 +379,15 @@
android:fontFamily=
"sans-serif-black"
android:fontFamily=
"sans-serif-black"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
android:textStyle=
"bold"
tools:text=
"Project links
"
/>
android:text=
"@string/home_links_project
"
/>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:layout_width=
"match_parent
"
itemBinding=
"@{viewModel.itemBinding}
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
android:fadingEdgeLength=
"@dimen/l1"
android:fadingEdgeLength=
"@dimen/l1"
items=
"@{viewModel.itemsProject}"
android:layout_width=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/l1"
android:paddingTop=
"@dimen/l1"
android:requiresFadingEdge=
"horizontal"
android:requiresFadingEdge=
"horizontal"
...
...
app/src/main/res/layout/item_developer.xml
View file @
823b121c
...
@@ -3,13 +3,25 @@
...
@@ -3,13 +3,25 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
>
xmlns:tools=
"http://schemas.android.com/tools"
>
<data></data>
<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
<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"
android:onClick=
"@{() -> viewModel.onLinkPressed(item.link)}"
tools:layout_gravity=
"center"
tools:layout_gravity=
"center"
tools:paddingEnd=
"@dimen/l1
"
>
android:padding=
"@dimen/l_50
"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/developer_link"
android:id=
"@+id/developer_link"
...
@@ -17,13 +29,15 @@
...
@@ -17,13 +29,15 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_paypal"
/>
app:srcCompat=
"@{item.icon}"
tools:srcCompat=
"@drawable/ic_paypal"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/developer_link_name"
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:layout_marginTop=
"@dimen/l_50"
android:text=
"@{item.title}"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textAppearance=
"?appearanceTextCaptionNormal"
android:textStyle=
"bold"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
...
@@ -33,6 +47,7 @@
...
@@ -33,6 +47,7 @@
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
style=
"?styleImageSmall"
style=
"?styleImageSmall"
android:layout_marginStart=
"@dimen/l_50"
android:layout_marginStart=
"@dimen/l_50"
android:layout_height=
"14sp"
app:layout_constraintBottom_toBottomOf=
"@+id/developer_link_name"
app:layout_constraintBottom_toBottomOf=
"@+id/developer_link_name"
app:layout_constraintStart_toEndOf=
"@+id/developer_link_name"
app:layout_constraintStart_toEndOf=
"@+id/developer_link_name"
app:layout_constraintTop_toTopOf=
"@+id/developer_link_name"
app:layout_constraintTop_toTopOf=
"@+id/developer_link_name"
...
...
app/src/main/res/values/dimens.xml
View file @
823b121c
...
@@ -14,4 +14,6 @@
...
@@ -14,4 +14,6 @@
<dimen
name=
"l_75"
>
12dp
</dimen>
<dimen
name=
"l_75"
>
12dp
</dimen>
<dimen
name=
"l1"
>
16dp
</dimen>
<dimen
name=
"l1"
>
16dp
</dimen>
<dimen
name=
"l2"
>
32dp
</dimen>
<dimen
name=
"l2"
>
32dp
</dimen>
<dimen
name=
"r1"
>
8dp
</dimen>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/strings_md2.xml
View file @
823b121c
...
@@ -16,4 +16,11 @@
...
@@ -16,4 +16,11 @@
<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_project"
>
Project links
</string>
<string
name=
"home_item_paypal"
>
PayPal
</string>
<string
name=
"home_item_patreon"
>
Patreon
</string>
<string
name=
"home_item_twitter"
>
Twitter
</string>
<string
name=
"home_item_source"
>
Source
</string>
<string
name=
"home_item_xda"
>
XDA
</string>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/styles_md2.xml
View file @
823b121c
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<!--///-->
<!--///-->
<item
name=
"selectableItemBackground"
>
@drawable/bg_selectable
</item>
<item
name=
"actionBarSize"
>
60dp
</item>
<item
name=
"actionBarSize"
>
60dp
</item>
<item
name=
"styleAppbar"
>
@style/WidgetFoundation.Appbar
</item>
<item
name=
"styleAppbar"
>
@style/WidgetFoundation.Appbar
</item>
...
...
app/src/main/res/values/styles_md2_impl.xml
View file @
823b121c
...
@@ -23,17 +23,17 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
...
@@ -23,17 +23,17 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
<style
name=
"WidgetFoundation.Card"
parent=
"Widget.MaterialComponents.CardView"
>
<style
name=
"WidgetFoundation.Card"
parent=
"Widget.MaterialComponents.CardView"
>
<item
name=
"cardBackgroundColor"
>
?
attr/colorSurface
</item>
<item
name=
"cardBackgroundColor"
>
?
colorSurfaceVariant
</item>
<item
name=
"cardCornerRadius"
>
@dimen/l_50
</item>
<item
name=
"cardCornerRadius"
>
@dimen/l_50
</item>
<item
name=
"cardElevation"
>
4
dp
</item>
<item
name=
"cardElevation"
>
0
dp
</item>
</style>
</style>
<style
name=
"WidgetFoundation.Card.OnPrimary"
parent=
"Widget.MaterialComponents.CardView"
>
<style
name=
"WidgetFoundation.Card.OnPrimary"
parent=
"Widget.MaterialComponents.CardView"
>
<item
name=
"cardCornerRadius"
>
@dimen/l_50
</item>
<item
name=
"cardCornerRadius"
>
@dimen/l_50
</item>
<item
name=
"cardElevation"
>
0dp
</item>
<item
name=
"cardElevation"
>
0dp
</item>
<item
name=
"strokeColor"
>
?
attr/
colorOnPrimaryVariant
</item>
<item
name=
"strokeColor"
>
?colorOnPrimaryVariant
</item>
<item
name=
"strokeWidth"
>
1dp
</item>
<item
name=
"strokeWidth"
>
1dp
</item>
<item
name=
"cardBackgroundColor"
>
?
attr/
colorPrimary
</item>
<item
name=
"cardBackgroundColor"
>
?colorPrimary
</item>
</style>
</style>
...
...
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