updated settings, star and my repos layouts

This commit is contained in:
M M Arif 2020-02-04 19:19:39 +05:00
parent 8b75cac9d8
commit dbcd80eace
9 changed files with 38 additions and 36 deletions

View File

@ -14,7 +14,7 @@
android:id="@+id/recyclerView" android:id="@+id/recyclerView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/colorPrimary" android:background="?attr/primaryBackgroundColor"
android:padding="4dp" android:padding="4dp"
android:scrollbars="vertical" /> android:scrollbars="vertical" />
@ -47,7 +47,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="15dp" android:layout_margin="15dp"
android:text="@string/noData" android:text="@string/noData"
android:textColor="@color/white" android:textColor="?attr/primaryTextColor"
android:gravity="center" android:gravity="center"
android:textSize="20sp" android:textSize="20sp"
android:visibility="gone" /> android:visibility="gone" />

View File

@ -2,12 +2,12 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/colorPrimary"> android:background="?attr/primaryBackgroundColor">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/backgroundColor" > android:background="?attr/primaryBackgroundColor" >
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -27,7 +27,6 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_below="@id/timeLayout" android:layout_below="@id/timeLayout"
android:background="@color/divider"
/> />
<include <include

View File

@ -14,7 +14,7 @@
android:id="@+id/recyclerView" android:id="@+id/recyclerView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/colorPrimary" android:background="?attr/primaryBackgroundColor"
android:padding="4dp" android:padding="4dp"
android:scrollbars="vertical" android:scrollbars="vertical"
/> />
@ -28,7 +28,7 @@
android:layout_margin="15dp" android:layout_margin="15dp"
android:gravity="center" android:gravity="center"
android:text="@string/noData" android:text="@string/noData"
android:textColor="@color/white" android:textColor="?attr/primaryTextColor"
android:textSize="20sp" android:textSize="20sp"
android:visibility="gone" /> android:visibility="gone" />

View File

@ -4,7 +4,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/layoutTime" android:id="@+id/layoutTime"
android:orientation="vertical" android:orientation="vertical"
android:background="@color/colorPrimary"> android:background="?attr/primaryBackgroundColor">
<TextView <TextView
android:id="@+id/tvAppearance" android:id="@+id/tvAppearance"
@ -14,6 +14,7 @@
android:drawableStart="@drawable/ic_color" android:drawableStart="@drawable/ic_color"
android:drawablePadding="20dp" android:drawablePadding="20dp"
android:text="@string/settingsAppearanceHeader" android:text="@string/settingsAppearanceHeader"
android:textStyle="bold"
android:textColor="@color/colorDarkGreen"/> android:textColor="@color/colorDarkGreen"/>
<LinearLayout <LinearLayout
@ -32,7 +33,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsDateTimeHeaderText" android:text="@string/settingsDateTimeHeaderText"
android:textColor="@color/white"/> android:textColor="?attr/primaryTextColor"/>
<TextView <TextView
android:id="@+id/tvDateTimeSelected" android:id="@+id/tvDateTimeSelected"
@ -42,7 +43,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsDateTimeHeaderDefault" android:text="@string/settingsDateTimeHeaderDefault"
android:textColor="@color/white"/> android:textColor="?attr/selectedTextColor"/>
</LinearLayout> </LinearLayout>
@ -61,7 +62,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsIssueBadgeHeaderText" android:text="@string/settingsIssueBadgeHeaderText"
android:textColor="@color/white"/> android:textColor="?attr/primaryTextColor"/>
<Switch <Switch
android:id="@+id/switchIssuesBadge" android:id="@+id/switchIssuesBadge"
@ -91,7 +92,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/codeBlockHeaderText" android:text="@string/codeBlockHeaderText"
android:textColor="@color/white"/> android:textColor="?attr/primaryTextColor"/>
<TextView <TextView
android:id="@+id/codeBlockSelected" android:id="@+id/codeBlockSelected"
@ -101,7 +102,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/codeBlockSelectedText" android:text="@string/codeBlockSelectedText"
android:textColor="@color/white"/> android:textColor="?attr/selectedTextColor"/>
</LinearLayout> </LinearLayout>
@ -121,7 +122,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsHomeScreenHeaderText" android:text="@string/settingsHomeScreenHeaderText"
android:textColor="@color/white"/> android:textColor="?attr/primaryTextColor"/>
<TextView <TextView
android:id="@+id/homeScreenSelected" android:id="@+id/homeScreenSelected"
@ -131,7 +132,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsHomeScreenSelectedText" android:text="@string/settingsHomeScreenSelectedText"
android:textColor="@color/white"/> android:textColor="?attr/selectedTextColor"/>
</LinearLayout> </LinearLayout>
@ -151,7 +152,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsCustomFontHeaderText" android:text="@string/settingsCustomFontHeaderText"
android:textColor="@color/white"/> android:textColor="?attr/primaryTextColor"/>
<TextView <TextView
android:id="@+id/customFontSelected" android:id="@+id/customFontSelected"
@ -161,7 +162,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/defaultCopy" android:text="@string/defaultCopy"
android:textColor="@color/white"/> android:textColor="?attr/selectedTextColor"/>
</LinearLayout> </LinearLayout>

View File

@ -4,7 +4,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_below="@+id/translationDivider" android:layout_below="@+id/translationDivider"
android:background="@color/colorPrimary"> android:background="?attr/primaryBackgroundColor">
<TextView <TextView
android:id="@+id/tvLanguage" android:id="@+id/tvLanguage"
@ -14,6 +14,7 @@
android:drawableStart="@drawable/ic_language" android:drawableStart="@drawable/ic_language"
android:drawablePadding="20dp" android:drawablePadding="20dp"
android:text="@string/settingsLanguageHeaderText" android:text="@string/settingsLanguageHeaderText"
android:textStyle="bold"
android:textColor="@color/colorDarkGreen"/> android:textColor="@color/colorDarkGreen"/>
<LinearLayout <LinearLayout
@ -32,7 +33,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsLanguageSelectorHeader" android:text="@string/settingsLanguageSelectorHeader"
android:textColor="@color/white"/> android:textColor="?attr/primaryTextColor"/>
<TextView <TextView
android:id="@+id/tvLanguageSelected" android:id="@+id/tvLanguageSelected"
@ -42,7 +43,7 @@
android:layout_marginStart="44dp" android:layout_marginStart="44dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/settingsLanguageSelectedHeaderDefault" android:text="@string/settingsLanguageSelectedHeaderDefault"
android:textColor="@color/white"/> android:textColor="?attr/selectedTextColor"/>
<TextView <TextView
android:id="@+id/helpTranslate" android:id="@+id/helpTranslate"

View File

@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/backgroundColor" > android:background="?attr/primaryBackgroundColor" >
<TextView <TextView
android:id="@+id/repoType" android:id="@+id/repoType"
@ -20,7 +20,6 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" android:padding="10dp"
android:theme="@style/AppTheme"
tools:context=".activities.MainActivity"> tools:context=".activities.MainActivity">
<ImageView <ImageView
@ -51,7 +50,7 @@
android:layout_weight=".95" android:layout_weight=".95"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="@string/repoName" android:text="@string/repoName"
android:textColor="@color/white" android:textColor="?attr/primaryTextColor"
android:textSize="18sp" /> android:textSize="18sp" />
<ImageView <ImageView
@ -71,7 +70,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="@string/repoFullname" android:text="@string/repoFullname"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -80,7 +79,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="@string/repoDescription" android:text="@string/repoDescription"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="16sp"
android:visibility="gone" /> android:visibility="gone" />
@ -101,7 +100,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/repoWatchers" android:text="@string/repoWatchers"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -114,7 +113,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/repoStars" android:text="@string/repoStars"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -127,7 +126,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/repoWatchers" android:text="@string/repoWatchers"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="16sp" />
<ImageView <ImageView

View File

@ -10,8 +10,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" android:padding="10dp"
android:theme="@style/AppTheme" android:background="?attr/primaryBackgroundColor"
android:background="@color/backgroundColor"
tools:context=".activities.MainActivity"> tools:context=".activities.MainActivity">
<TextView <TextView
@ -48,7 +47,7 @@
android:layout_weight=".95" android:layout_weight=".95"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="@string/repoName" android:text="@string/repoName"
android:textColor="@color/white" android:textColor="?attr/primaryTextColor"
android:textSize="18sp" /> android:textSize="18sp" />
<ImageView <ImageView
@ -68,7 +67,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="@string/repoFullname" android:text="@string/repoFullname"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -77,7 +76,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="@string/repoDescription" android:text="@string/repoDescription"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="16sp"
android:visibility="gone" /> android:visibility="gone" />
@ -98,7 +97,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/repoWatchers" android:text="@string/repoWatchers"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
@ -111,7 +110,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/repoStars" android:text="@string/repoStars"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
@ -124,7 +123,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/repoWatchers" android:text="@string/repoWatchers"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryTextColor"
android:textSize="14sp" /> android:textSize="14sp" />
<ImageView <ImageView

View File

@ -4,4 +4,5 @@
<attr name="primaryBackgroundColor" format="reference" /> <attr name="primaryBackgroundColor" format="reference" />
<attr name="inputBackgroundColor" format="reference" /> <attr name="inputBackgroundColor" format="reference" />
<attr name="inputTextColor" format="reference" /> <attr name="inputTextColor" format="reference" />
<attr name="selectedTextColor" format="reference" />
</resources> </resources>

View File

@ -12,6 +12,7 @@
<item name="inputBackgroundColor">@color/inputBackground</item> <item name="inputBackgroundColor">@color/inputBackground</item>
<item name="inputTextColor">@color/colorWhite</item> <item name="inputTextColor">@color/colorWhite</item>
<item name="checkboxStyle">@style/AppThemeCheckBoxStyle</item> <item name="checkboxStyle">@style/AppThemeCheckBoxStyle</item>
<item name="selectedTextColor">@color/darkGreen</item>
</style> </style>
<!-- Light theme --> <!-- Light theme -->
@ -25,6 +26,7 @@
<item name="inputBackgroundColor">@color/lightThemeInputBackground</item> <item name="inputBackgroundColor">@color/lightThemeInputBackground</item>
<item name="inputTextColor">@color/lightThemeInputTextColor</item> <item name="inputTextColor">@color/lightThemeInputTextColor</item>
<item name="checkboxStyle">@style/AppThemeLightCheckBoxStyle</item> <item name="checkboxStyle">@style/AppThemeLightCheckBoxStyle</item>
<item name="selectedTextColor">@color/darkGreen</item>
</style> </style>
<style name="AppThemeLightCheckBoxStyle" parent="Base.Widget.AppCompat.CompoundButton.CheckBox"> <style name="AppThemeLightCheckBoxStyle" parent="Base.Widget.AppCompat.CompoundButton.CheckBox">