Created
September 14, 2017 09:11
-
-
Save eugenebrusov/a0d6146e899c8e906a8ac15b1fd241eb to your computer and use it in GitHub Desktop.
CardView - media 3x and actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.v7.widget.CardView | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
style="@style/CardView.Light" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="8dp" | |
android:layout_marginStart="8dp" | |
android:layout_marginEnd="8dp"> | |
<android.support.constraint.ConstraintLayout | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:id="@+id/media_image" | |
android:layout_width="240dp" | |
android:layout_height="240dp" | |
android:layout_marginTop="16dp" | |
android:layout_marginStart="16dp" | |
android:layout_marginBottom="16dp" | |
android:scaleType="centerCrop" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent" /> | |
<ImageButton | |
android:id="@+id/favorite_button" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="8dp" | |
android:layout_marginStart="8dp" | |
android:layout_marginEnd="16dp" | |
android:background="#00FFFFFF" | |
android:padding="12dp" | |
app:srcCompat="@drawable/ic_favorite_black_24dp" | |
app:layout_constraintTop_toTopOf="@+id/media_image" | |
app:layout_constraintStart_toEndOf="@+id/media_image" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintHorizontal_bias="0.5" /> | |
<ImageButton | |
android:id="@+id/bookmark_button" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:background="#00FFFFFF" | |
android:padding="12dp" | |
app:srcCompat="@drawable/ic_bookmark_black_24dp" | |
app:layout_constraintEnd_toEndOf="@+id/favorite_button" | |
app:layout_constraintTop_toBottomOf="@+id/favorite_button" /> | |
<ImageButton | |
android:id="@+id/share_button" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:background="#00FFFFFF" | |
android:padding="12dp" | |
app:srcCompat="@drawable/ic_share_black_24dp" | |
app:layout_constraintTop_toBottomOf="@+id/bookmark_button" | |
app:layout_constraintEnd_toEndOf="@+id/bookmark_button" /> | |
</android.support.constraint.ConstraintLayout> | |
</android.support.v7.widget.CardView> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector android:alpha="0.54" android:height="24dp" | |
android:viewportHeight="24.0" android:viewportWidth="24.0" | |
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | |
<path android:fillColor="#FF000000" android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/> | |
</vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector android:alpha="0.54" android:height="24dp" | |
android:viewportHeight="24.0" android:viewportWidth="24.0" | |
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | |
<path android:fillColor="#FF000000" android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"/> | |
</vector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment