0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2025-01-05 15:01:01 +00:00

added an outline to sponsor buttons

This commit is contained in:
X1nto 2021-02-14 16:54:44 +04:00
parent dfbb623102
commit c9245122f5
3 changed files with 51 additions and 5 deletions

View file

@ -12,8 +12,7 @@ import com.vanced.manager.ui.viewmodels.HomeViewModel
class SponsorAdapter(
private val context: Context,
private val viewModel: HomeViewModel,
//private val json: ObservableField<JsonObject?>
private val viewModel: HomeViewModel
) : RecyclerView.Adapter<SponsorAdapter.LinkViewHolder>() {
private val brave = SponsorModel(

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<gradient
android:angle="45"
android:endColor="#FFFF0032"
android:startColor="#FF2E73FF" />
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp"
android:bottomLeftRadius="12dp"
android:bottomRightRadius="12dp" />
</shape>
</item>
<item
android:bottom="1.5dp"
android:left="1.5dp"
android:right="1.5dp"
android:top="1.5dp">
<shape android:shape="rectangle" >
<solid android:color="?colorLinkBG" />
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp"
android:bottomLeftRadius="12dp"
android:bottomRightRadius="12dp" />
</shape>
</item>
</layer-list>

View file

@ -11,9 +11,10 @@
app:cardCornerRadius="12dp"
app:cardElevation="0dp">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/sponsor_background"
android:orientation="vertical">
<ImageView
@ -22,6 +23,11 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/sponsor_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="8dp"
app:tint="?colorLinkImage"
tools:src="@drawable/ic_brave" />
@ -30,10 +36,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:layout_marginBottom="14dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:text="Brave"
android:textColor="?colorLinkImage" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>