Unexpected End of File, not sure why - unexpectendoffile

I'm running into "Unexpected End of File" and I'm not sure why. I'm sure it's something simple but I haven't figured it out yet.
Any help or suggestions would be greatly appreciated.
Here is my code, Thank You.
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.superjoe.practicecard.FullscreenActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="#drawable/goliath1"
android:scaleType="centerCrop"
android:id="#+id/imageGoliath"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, I'm Goliath."
android:textColor="#C62828"
android:textSize="36dp"
android:fontFamily="sans-serif-medium"
android:textStyle="bold"
android:id="#+id/ImGoliath"
android:layout_centerInParent="true"
android:layout_alignParentTop="true"
android:padding="12dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Don't be afraid, I don't bite..."
android:textSize="26dp"
android:fontFamily="sans-serif-medium"
android:textColor="#C62828"
android:id="#+id/afraid"
android:layout_below="#id/ImGoliath"
android:textStyle="bold|italic"
android:paddingLeft="12dp"
android:paddingBottom="18dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/unless"
android:text="Unless!"
android:textColor="#C62828"
android:textSize="52dp"
android:textStyle="bold"
android:layout_alignParentRight="true"
android:layout_below="#id/afraid"
android:padding="24dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/Youreacricket"
android:text="YOU'RE A CRICKET!"
android:textColor="#C62828"
android:layout_alignParentBottom="true"
android:textSize="42sp"
android:textStyle="bold"
android:layout_centerInParent="true"
android:paddingTop="60dp"/>
</RelativeLayout>

You need to close your FrameLayout tag under your RelativeLayout tag.
</FrameLayout>

Related

Top Level Element is not Compaleted

I'm really new to this and I've searched for answers but none seem relevant. When I build my android project I have an error. See at the bottom of this xml. Where do I go to find this "top level element" and why might it be incomplete?:
here code in my rowdata.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:background="#drawable/rounded_corner">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="vertical"/>
<TextView
android:id="#+id/listID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
<TextView
android:id="#+id/listJudul"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Judul Buku"
android:textSize="15sp"
android:textStyle="bold"/>
<TextView
android:id="#+id/listNama"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Nama"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
<TextView
android:id="#+id/listTglPinjam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tgl Pinjam"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
<TextView
android:id="#+id/listStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Status"
android:layout_marginTop="5dp"
android:gravity="right"
android:textSize="13sp"/>
</LinearLayout>
</LinearLayout>

handling textview's width with screen rotation xamarin android

I have created a Xamarin.android app with listview inside a horizontalScrollView. I added [Activity(Label = "#string/app_name", Theme = "#style/AppTheme", MainLauncher = true, ConfigurationChanges = Android.Content.PM.ConfigChanges.Orientation | Android.Content.PM.ConfigChanges.ScreenSize)] to handle screen rotation. but what I realized is that my horizontalScrollView doesn't expand when screen is rotated horizontally so I added this android:fillViewport="true". it worked. but my textviews' widths remained the same. so I guessed it's because I have fixed width values for my textviews. I looked things up and finally came up with determining a weightsum for my linearlayout and weights for my textviews. this is my code:
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="fill_parent"
>
<Toolbar
android:minHeight="?android:attr/actionBarSize"
android:background="?android:attr/colorPrimary"
android:minWidth="25px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/toolbar1" >
<SearchView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/searchView1" />
</Toolbar>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/customselector"
android:padding="8dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="10"
android:orientation="horizontal"
>
<TextView
android:text="Text"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="100px"
android:id="#+id/textView1"
android:gravity="center"
android:textColor="#android:color/holo_red_dark"/>
<TextView
android:text="Text"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="100px"
android:id="#+id/textView2"
android:layout_toRightOf="#id/textView1"
android:textColor="#android:color/holo_red_dark"
android:gravity="center"
android:layout_marginLeft="2dp"/>
<TextView
android:text="Text"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="100px"
android:id="#+id/textView3"
android:layout_toRightOf="#id/textView2"
android:gravity="center"
android:textColor="#android:color/holo_red_dark"
android:layout_marginLeft="2dp"/>
<TextView
android:text="Text"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="100px"
android:id="#+id/textView4"
android:layout_toRightOf="#id/textView3"
android:gravity="center"
android:layout_marginLeft="2dp"
android:textColor="#android:color/holo_red_dark"/>
<TextView
android:text="Text"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="100px"
android:id="#+id/textView5"
android:layout_toRightOf="#id/textView4"
android:gravity="center"
android:layout_marginLeft="2dp"
android:textColor="#android:color/holo_blue_dark"
/>
</LinearLayout>
</RelativeLayout>
<ListView android:id="#+id/List"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="#FFDAFF7F"
android:choiceMode="singleChoice"
/>
<TextView
android:text="Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/textView6"
android:layout_gravity="bottom|end"/>
</LinearLayout>
</HorizontalScrollView>
I chose weightsum=10 because I want my textviews' width to be big enough. so I thought I could view the rest of my textviews by scrolling. but the scrollview stopped working. why is that? what do I do?
thanks in advance.

How to create view in Xamarin.Android

enter image description here
How do I make a view like this in Xamarin.Android?
You can use LinearLayout and GridLayout to achieve it. Use two LinearLayout, set the android:layout_weight=1 both of them, It could divide the entire screen equally, then use GridLayout, add all of Awards, use Textview to show the awards name, use ImageView to show the awards image. You can set the android:background="#drawable/back" as the background(award shelf image) in the outside LinearLayout
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#drawable/back"
>
<GridLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:rowCount="2"
android:columnCount="6"
android:orientation="vertical"
>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="0">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="4">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="5">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
</GridLayout>
<GridLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:rowCount="4"
android:columnCount="6"
android:orientation="vertical"
>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="0">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="4">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="5">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hamberguer1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/myicon"/>
</LinearLayout>
</GridLayout>
</LinearLayout>
Here is running gif.
You need to write a new GridView for shelves. Here is code.
public class BookGridView: Android.Widget.GridView
{
Context context;
private Bitmap background;
public BookGridView(Context context, Android.Util.IAttributeSet attributeSet):base(context, attributeSet)
{
this.context = context;
background = null;
}
protected override void DispatchDraw(Canvas canvas)
{
int count = ChildCount;
int top = count > 0 ? GetChildAt(0).Top : 0;
int width = Width;
int height = Height;
int totalCount = this.Count;
//If the total is 0, there is no need to calculate the height and draw the picture
if (totalCount > 0)
{
//get Columns
int numColumns = 3;
// Calculate the row height by calculating the number of rows and height
int rowCount = totalCount / numColumns;
if (totalCount % numColumns != 0)
{
rowCount++;
}
int rowHeight = height / rowCount;
if (background == null)
{
background = BitmapFactory.DecodeResource(Resources,
Resource.Drawable.bookshelf_layer_center);
background = Bitmap.CreateScaledBitmap(background, width, rowHeight, true);
}
int backgroundWidth = background.Width;
int backgroundHeight = background.Height;
for (int y = top; y < height; y += backgroundHeight)
{
for (int x = 0; x < width; x += backgroundWidth)
{
canvas.DrawBitmap(background, x, y, null);
}
}
}
base.DispatchDraw(canvas);
}
}
}
Here is running screenshot. shelves will increase by the number of awards.
I upload my demo, you can set columns of shelves by yourself.
https://github.com/851265601/Xamarin.Android_ListviewSelect/blob/master/App17.zip

tiny images when using StaggeredGridLayoutManager

I have a recyclerview inside of a viewholder item that is for displaying up to 5 images nicely along with some other text. it's working pretty good except that the images are mega tiny looking, I'm not sure where I'm going wrong.
the main viewholder item layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:background="#color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="14dp">
<TextView
android:id="#+id/feedItem_txtTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:layout_marginTop="14dp"
android:textColor="#color/dark_gray"/>
<android.support.v7.widget.RecyclerView
android:id="#+id/feedItem_rvImageGrid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<View
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="15dp"
android:background="#color/very_light_gray"/>
</LinearLayout>
</LinearLayout>
the image grid viewholder item:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="#+id/feedItemImage_ivImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</LinearLayout>
the code I'm using to bind the grid to the recyclerview
_layoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.Vertical);
_feedItemImageAdapter = new FeedItemImageAdapter(_imageUrlsVisible, _imageUrlsFull);
_rvImageGrid.SetAdapter(_feedItemImageAdapter);
_rvImageGrid.SetLayoutManager(_layoutManager);
not sure what else you'd like to see, let me know if I need to provide more code samples, I'm at a lost on what I'm doing wrong.
One possibility is that your image size itself is small.
I tried to reproduce this question by using pictures of different sizes,when the image grid viewholder item is as follows:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/feedItemImage_ivImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</LinearLayout>
The result is :
But we can adjust the parent properties of the ImageView to
android:layout_width="match_parent"
android:layout_height="match_parent"
So when we use the following code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="#+id/feedItemImage_ivImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</LinearLayout>
Now,we will find the image will be adjusted to the proper size,but at the same time,the picture is distorted and blurry.

Android TV move focus between RecyclerViews

I am building an Android TV app with the following layout:
Both lists on the left and on the right are RecyclerViews with vertical LinearLayoutManagers, Header view is static. Navigation with D-PAD works fine within one list, but when switching from one list to another there are issues. Focus moves from, say list1's item 5 to list2' item 5. When list 2 is short has less than 5 items, it just loses focus.
I want the last focused item index saved and when the user navigates list1-list2-list1 the item with that index to gain focus again and also prevent the views from losing focus. Is there any good solution to this?
Required behaviour:
user navigates to the top of the list and presses "UP" - focus stays where it was, nothing happens.
user navigates to the bottom of the list and presses "DOWN" - focus stays where it was, nothing happens.
user navigates from list1 to list2 - the item, that previously had focus in list2, gains focus or item0 gains focus if none was focused previously.
main layout:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="#+id/iv_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="27dp"
android:layout_marginLeft="48dp"
android:layout_marginRight="48dp"
android:layout_marginTop="27dp"
android:orientation="horizontal"
>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:orientation="horizontal"
>
<ImageView
android:id="#+id/iv_poster"
android:layout_width="#dimen/episodes_list_item_height"
android:layout_height="#dimen/episodes_list_image_width"
/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
>
<TextView
android:id="#+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/tv_release_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
/>
<TextView
android:id="#+id/tv_rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:drawableLeft="#drawable/ic_star_white_24dp"
android:drawablePadding="#dimen/view_padding_small"
/>
</FrameLayout>
<TextView
android:id="#+id/tv_description"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/rv_seasons_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:focusable="false"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/rv_episodes_list"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:focusable="false"
/>
</LinearLayout>
</FrameLayout>
item layout, used for both lists:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="#dimen/seasons_list_item_height"
android:orientation="horizontal"
android:focusable="true"
>
<TextView
android:id="#+id/tv_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_weight="1"
/>
<TextView
android:id="#+id/tv_episodes_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:ems="10"
/>
</LinearLayout>
Digging through Google's Leanback library sources answered my payers.
If you face the same trouble, just wrap your RecyclerViews with this and don't forget to set
private boolean mPersistFocusVertical = false;
if you want the focus to be persisted when searching horizontally, like in my layout.
Modify your main layout as below.
For directional navigation we can add properties like nextFocusDown, nextFocusLeft, nextFocusRight, nextFocusUp to focus relevant items as per our requirements.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="#+id/iv_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="27dp"
android:layout_marginLeft="48dp"
android:layout_marginRight="48dp"
android:layout_marginTop="27dp"
android:orientation="horizontal"
>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:orientation="horizontal"
>
<ImageView
android:id="#+id/iv_poster"
android:layout_width="#dimen/episodes_list_item_height"
android:layout_height="#dimen/episodes_list_image_width"
/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
>
<TextView
android:id="#+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/tv_release_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
/>
<TextView
android:id="#+id/tv_rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:drawableLeft="#drawable/ic_star_white_24dp"
android:drawablePadding="#dimen/view_padding_small"
/>
</FrameLayout>
<TextView
android:id="#+id/tv_description"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/rv_seasons_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:focusable="false"
android:nextFocusDown="#+id/rv_episodes_list"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/rv_episodes_list"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:focusable="false"
android:nextFocusUp="#+id/rv_seasons_list"
/>
</LinearLayout>
Hope this will solve your problem !!

Resources