Skip to content

Commit

Permalink
recycler view added
Browse files Browse the repository at this point in the history
  • Loading branch information
Harounnn committed Mar 17, 2024
1 parent 69fd44b commit 3350a1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 59 deletions.
64 changes: 7 additions & 57 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,65 +31,15 @@
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>

<RelativeLayout
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar"
android:background="#720455">


<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="240dp"
app:cardBackgroundColor="#910A67"
android:layout_marginBottom="10dp"
android:id="@+id/cardview1">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="60dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/black"
android:text="Main Heading is here !!!"
android:textSize="20sp"
android:textStyle="bold"
android:padding="5dp">
</TextView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="160dp"
android:orientation="horizontal">
<TextView
android:layout_width="200dp"
android:layout_height="match_parent"
android:textColor="@color/black"
android:text="Description is here !!!"
android:textStyle="bold"
android:textSize="15sp"
android:padding="10dp"
android:ellipsize="end"
android:maxLines="5">
</TextView>
<ImageView
android:layout_width="240dp"
android:layout_height="match_parent"
android:src="@drawable/ic_launcher_background">
</ImageView>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>



</RelativeLayout>


android:id="@+id/recyclerview"
android:layout_margin="2dp"
android:fitsSystemWindows="true"
android:padding="2dp"
android:layout_below="@id/toolbar">

</androidx.recyclerview.widget.RecyclerView>

</RelativeLayout>
3 changes: 1 addition & 2 deletions app/src/main/res/layout/detailed_news.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="">
android:layout_height="match_parent">

<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
Expand Down

0 comments on commit 3350a1b

Please sign in to comment.