Skip to content

Commit

Permalink
crypto News UI Design
Browse files Browse the repository at this point in the history
  • Loading branch information
Tr-reny committed Sep 5, 2022
1 parent 81099ca commit 30d4dd5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 44 deletions.
51 changes: 22 additions & 29 deletions app/src/main/res/layout/activity_content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,46 +36,39 @@
android:layout_height="wrap_content"
android:paddingTop="?attr/actionBarSize">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingRight="@dimen/normalPadding"
android:paddingLeft="@dimen/normalPadding">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/normalPadding"
android:paddingRight="@dimen/normalPadding">

<!--replace with recycler view-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"></LinearLayout>

<!--replace with recycler view-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp">
</LinearLayout>

<!--replace with recycler view-->
<include layout="@layout/layout_featured_news" />

<!--replace with recycler view-->
<include
layout="@layout/layout_featured_news"/>
<!--replace with recycler view-->

<!--replace with recycler view-->
<include layout="@layout/layout_news" />

<include
layout="@layout/layout_news"/>
<include layout="@layout/layout_news" />

<include
layout="@layout/layout_news"/>
<include layout="@layout/layout_news" />

<include
layout="@layout/layout_news"/>
<include layout="@layout/layout_news" />

<include
layout="@layout/layout_news"/>
<include
layout="@layout/layout_news"/>
<include layout="@layout/layout_news" />

<include
layout="@layout/layout_news"/>
<include layout="@layout/layout_news" />


</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
29 changes: 14 additions & 15 deletions app/src/main/res/layout/layout_news.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<RelativeLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="40dp"
xmlns:android="http://schemas.android.com/apk/res/android">
android:layout_marginTop="40dp">

<ImageView
android:id="@+id/newsThumbnailImageView"
Expand All @@ -16,23 +15,23 @@
style="@style/viewParent.headerText"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@id/newsThumbnailImageView"
android:textSize="15sp"
android:maxLines="2"
android:ellipsize="end"
android:text="Analysts See Slower Bitcoin Hashrate Growth in 2022 Amid Market Correction "/>
android:maxLines="2"
android:text="Analysts See Slower Bitcoin Hashrate Growth in 2022 Amid Market Correction "
android:textSize="15sp" />

<TextView
android:id="@+id/newsDetailTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/featuredNewsContentColor"
android:layout_toRightOf="@id/newsThumbnailImageView"
android:layout_below="@id/newsTitleTextView"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:maxLines="2"
android:layout_marginTop="5dp"
android:layout_toRightOf="@id/newsThumbnailImageView"
android:ellipsize="end"
android:text="The Bitcoin (BTC) network’s hashrate – or computing power that goes into mining new coins – could reach 327 EH/s by the end of the year, a research note from the crypto-focused financial services firm BitOoda has predicted, after the firm cut an earlier forecast for the year."/>
android:maxLines="2"
android:text="The Bitcoin (BTC) network’s hashrate – or computing power that goes into mining new coins – could reach 327 EH/s by the end of the year, a research note from the crypto-focused financial services firm BitOoda has predicted, after the firm cut an earlier forecast for the year."
android:textColor="@color/featuredNewsContentColor" />

<TextView
android:id="@+id/tv_time_stamp"
Expand All @@ -48,10 +47,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="Read More >"
android:textStyle="bold"
android:textSize="11sp"
android:textColor="#019AE8"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
android:textSize="11sp"
android:textStyle="bold" />
</RelativeLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="parent">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
Expand Down

0 comments on commit 30d4dd5

Please sign in to comment.