mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
MaterialCardView
This commit is contained in:
parent
fd6a6bbd94
commit
bd5f9be5c8
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/card_margin"
|
||||
@ -103,4 +103,4 @@
|
||||
app:srcCompat="@drawable/ic_stop_24dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.KiwixTheme.CardView"
|
||||
android:layout_margin="@dimen/card_margin"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
@ -146,4 +145,4 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -336,11 +336,6 @@ object Libs {
|
||||
*/
|
||||
const val rxandroid: String = "io.reactivex.rxjava2:rxandroid:" + Versions.rxandroid
|
||||
|
||||
/**
|
||||
* http://developer.android.com/tools/extras/support-library.html
|
||||
*/
|
||||
const val cardview: String = "androidx.cardview:cardview:" + Versions.cardview
|
||||
|
||||
/**
|
||||
* https://developer.android.com/jetpack/androidx
|
||||
*/
|
||||
|
@ -87,8 +87,6 @@ object Versions {
|
||||
|
||||
const val rxandroid: String = "2.1.0" // available: "2.1.1"
|
||||
|
||||
const val cardview: String = "1.0.0"
|
||||
|
||||
const val core_ktx: String = "1.2.0"
|
||||
|
||||
const val kiwixlib: String = "9.0.1-1"
|
||||
|
@ -42,9 +42,6 @@ dependencies {
|
||||
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||
}
|
||||
|
||||
// Android Support
|
||||
implementation(Libs.cardview)
|
||||
|
||||
// SquiDB
|
||||
implementation(Libs.squidb)
|
||||
implementation(Libs.squidb_annotations)
|
||||
|
@ -25,7 +25,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.constraintlayout.widget.ConstraintSet;
|
||||
import androidx.core.content.ContextCompat;
|
||||
@ -72,11 +72,11 @@ public class TabsAdapter extends RecyclerView.Adapter<TabsAdapter.ViewHolder> {
|
||||
ImageViewExtensionsKt.tint(close,
|
||||
ContextExtensionsKt.getColorAttribute(context, R.attr.colorOnSurface));
|
||||
|
||||
CardView cardView = new CardView(context);
|
||||
MaterialCardView cardView = new MaterialCardView(context);
|
||||
cardView.setId(3);
|
||||
cardView.setUseCompatPadding(true);
|
||||
cardView.addView(contentImage, new CardView.LayoutParams(CardView.LayoutParams.MATCH_PARENT,
|
||||
CardView.LayoutParams.MATCH_PARENT));
|
||||
cardView.addView(contentImage, new MaterialCardView.LayoutParams(MaterialCardView.LayoutParams.MATCH_PARENT,
|
||||
MaterialCardView.LayoutParams.MATCH_PARENT));
|
||||
|
||||
ConstraintLayout constraintLayout = new ConstraintLayout(context);
|
||||
constraintLayout.setFocusableInTouchMode(true);
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/content_main_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -46,7 +46,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
|
@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.KiwixTheme.CardView"
|
||||
android:layout_margin="@dimen/card_margin">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
@ -128,4 +127,4 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<color name="gray500">#9E9E9E</color>
|
||||
<color name="gray700">#616161</color>
|
||||
<color name="gray850">#303030</color>
|
||||
<color name="card_view_background">#FFFFFF</color>
|
||||
<color name="card_view_background">@color/white</color>
|
||||
<color name="text_secondary">@color/gray700</color>
|
||||
<color name="text_tertiary">@color/gray500</color>
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
<item name="theme">@style/ThemeOverlay.MaterialComponents.Dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.KiwixTheme.CardView" parent="Base.CardView">
|
||||
<style name="Widget.KiwixTheme.CardView" parent="Widget.MaterialComponents.CardView">
|
||||
<item name="cardBackgroundColor">@color/card_view_background</item>
|
||||
</style>
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.MaterialComponents.Dialog.Alert</item>
|
||||
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.KiwixTheme.BottomSheetDialog</item>
|
||||
<item name="navigationViewStyle">@style/Widget.KiwixTheme.NavigationView</item>
|
||||
<item name="cardViewStyle">@style/Widget.KiwixTheme.CardView</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.KiwixTheme.CardView</item>
|
||||
<item name="toolbarStyle">@style/Widget.KiwixTheme.Toolbar</item>
|
||||
<item name="tabStyle">@style/Widget.KiwixTheme.TabLayout</item>
|
||||
<item name="appBarLayoutStyle">@style/Widget.KiwixTheme.AppBar</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user