Skip to content

Instantly share code, notes, and snippets.

@tigerhawkvok
Created April 7, 2015 19:30
Show Gist options
  • Save tigerhawkvok/0ca3d1f402afa29642d5 to your computer and use it in GitHub Desktop.
Save tigerhawkvok/0ca3d1f402afa29642d5 to your computer and use it in GitHub Desktop.
Wine Expanded View for StackOverflow
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
card_view:cardUseCompatPadding="true"
card_view:cardElevation="20sp"
card_view:cardPreventCornerOverlap="true"
android:layout_margin="6dp"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginBottom="4dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" >
<ImageView
android:id="@+id/wineImageBig"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="5dp"
android:contentDescription="@string/imageContentDescription"
android:scaleType="fitXY" />
<TextView
android:id="@+id/wineVineyardShow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/wineImageBig"
android:paddingTop="16dp"
android:textSize="30sp" />
<TextView
android:id="@+id/wineVarietalShow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/wineVineyardShow"
android:layout_toRightOf="@id/wineImageBig"
android:paddingTop="16dp"
android:textSize="20sp" />
<RatingBar
android:id="@+id/ratingShow"
style="@style/MaterialRatingBarSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/wineImageBig"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:isIndicator="true"
android:numStars="5"
android:paddingTop="16dp"
android:stepSize="1" />
<TextView
android:id="@+id/wineYearShow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/wineVarietalShow"
android:layout_toRightOf="@id/wineImageBig"
android:paddingTop="16dp" />
<TextView
android:id="@+id/wineCommentShow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/ratingShow"
android:paddingTop="16dp" />
<TextView
android:id="@+id/wineHumanDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/wineCommentShow"
android:paddingTop="16dp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment