I have a recycler view with a custom adapter and i am displaying news in recycler view. its working perfectly but its showing like given screen shots. I need code example step by step. how can i acheive that. My code of custom xml for recycler view.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="#30000000">
<ImageView
android:id="@+id/iv_news"
android:layout_width="match_parent"
android:layout_height="160dp" />
<TextView
android:id="@+id/tv_news_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:layout_marginTop="5dp"
android:padding="5dp"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Large"
/>
</LinearLayout>