Skip to content

Instantly share code, notes, and snippets.

@engr-erum
Last active November 15, 2017 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save engr-erum/cfbc5306327926e3912e7a4e8bf29fa2 to your computer and use it in GitHub Desktop.
Save engr-erum/cfbc5306327926e3912e7a4e8bf29fa2 to your computer and use it in GitHub Desktop.
isme se sub ko gone except rl_videoview ki height run time pe match parent krna hae
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_white"
android:orientation="vertical">
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
android:elevation="10dp"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:gravity="center_horizontal"
android:src="@drawable/header_logo" />
</android.support.v7.widget.Toolbar>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:id="@+id/ll_main_heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:id="@+id/tv_story_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="serif"
android:text="Video Title"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#000000"
android:typeface="serif" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/tv_video_upload_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed"
android:text="Name Upload By"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/colorPrimary"
android:typeface="serif" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="0.5"
android:gravity="right|center_vertical"
android:orientation="horizontal"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatImageView
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/ic_video_views" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/tv_vid_view_counts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:text="00"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/color_grey" />
<View
android:layout_width="1dp"
android:layout_height="15dp"
android:layout_marginLeft="5dp"
android:background="@color/color_grey" />
<LinearLayout
android:id="@+id/ll_rating_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RatingBar
android:id="@+id/rb_video"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:isIndicator="true"
android:numStars="5"
android:rating="0"
android:theme="@style/RatingBar" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/rl_videoview"
android:layout_width="match_parent"
android:layout_height="200dp">
<FrameLayout
android:id="@+id/fl_videoview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible">
<ImageView
android:id="@+id/iv_viewtracker"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@drawable/place_holde"
android:contentDescription="@null"
android:scaleType="centerCrop" />
<View
android:id="@+id/view_fixed_height"
android:layout_width="match_parent"
android:layout_height="200dp"
android:alpha="0.4"
android:background="@color/color_darker_gray" />
<ImageView
android:id="@+id/iv_action_play_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_play" />
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/exo_player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/ll_buttons"
android:focusable="true"
android:visibility="gone" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_audioview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/audio_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_mic_green" />
<VideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="200dp"
android:visibility="invisible" />
</LinearLayout>
</RelativeLayout>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/tv_vid_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="sans-serif"
android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#323232"
android:typeface="serif" />
<android.support.v7.widget.AppCompatImageView
android:id="@+id/iv_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right" />
<View
android:id="@+id/line_separator"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="8dp"
android:background="@color/color_grey" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_story_industry_tags"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="horizontal" />
<View
android:id="@+id/view_below_tag"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="8dp"
android:background="@color/color_grey" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/tv_related_stories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="15dp"
android:fontFamily="serif"
android:gravity="center_horizontal"
android:maxLines="1"
android:text="Related Stories"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#323232"
android:typeface="serif" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_related_story"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginBottom="20dp"
android:layout_marginTop="4dp"
android:background="#fff"
android:orientation="horizontal"
android:scrollbarSize="15dp"
android:scrollbarThumbVertical="@android:color/black" />
</LinearLayout>
</ScrollView>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment