mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Dark theme for profile activity
This commit is contained in:
parent
1344d7b294
commit
a55c83693c
10 changed files with 64 additions and 26 deletions
|
@ -2,7 +2,7 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/item_background"
|
||||
style="?itemBackground"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/item_background" >
|
||||
style="?itemBackground" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -12,15 +12,14 @@
|
|||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
android:background="@drawable/list_background"
|
||||
style="?listBackground"
|
||||
android:text="@string/profile_recent_actvity" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/profile_details_activitylist"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/item_background"
|
||||
android:divider="@drawable/divider_light"
|
||||
style="?profileActivityList"
|
||||
android:dividerHeight="3dp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -2,7 +2,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/item_background"
|
||||
style="?itemBackground"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/item_background"
|
||||
style="?profileCount"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="30dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -28,10 +27,9 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/item_background"
|
||||
style="?profileCount"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="30dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -41,10 +39,9 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/item_background"
|
||||
style="?profileCount"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="30dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -59,12 +56,11 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/item_background"
|
||||
style="?profileCount"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingTop="3dp"
|
||||
android:text="@string/profile_shared"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="11dp" />
|
||||
|
||||
<TextView
|
||||
|
@ -72,12 +68,11 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/item_background"
|
||||
style="?profileCount"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingTop="3dp"
|
||||
android:text="@string/profile_following"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="11dp" />
|
||||
|
||||
<TextView
|
||||
|
@ -85,12 +80,11 @@
|
|||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/item_background"
|
||||
style="?profileCount"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingTop="3dp"
|
||||
android:text="@string/profile_followers"
|
||||
android:textColor="@color/darkgray"
|
||||
android:textSize="11dp" />
|
||||
|
||||
</TableRow>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/item_background"
|
||||
style="?itemBackground"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
|
@ -23,19 +23,18 @@
|
|||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textColor="@color/darkgray"
|
||||
style="?profileActivityRow"
|
||||
android:textSize="10dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/row_activity_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColorLink="@color/linkblue"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toLeftOf="@id/row_activity_time"
|
||||
android:layout_toRightOf="@id/row_activity_icon"
|
||||
android:textColor="@color/darkgray"
|
||||
style="?profileActivityRow"
|
||||
android:textSize="13dp" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -24,6 +24,9 @@
|
|||
<attr name="folderBorderTop" format="string" />
|
||||
<attr name="folderBorderBottom" format="string" />
|
||||
<attr name="divider" format="string" />
|
||||
<attr name="profileCount" format="string" />
|
||||
<attr name="profileActivityList" format="string" />
|
||||
<attr name="profileActivityRow" format="string" />
|
||||
|
||||
<declare-styleable name="FlowLayout">
|
||||
<attr name="flow" />
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
<color name="saved_drop_shadow">#0E366f</color>
|
||||
|
||||
<color name="linkblue">#405BA8</color>
|
||||
<color name="dark_linkblue">#319DC5</color>
|
||||
|
||||
<color name="negative">#CC2A2E</color>
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</style>
|
||||
|
||||
<style name="listBackground.dark">
|
||||
<item name="android:background">@drawable/list_background</item>
|
||||
<item name="android:background">@drawable/dark_list_background</item>
|
||||
</style>
|
||||
|
||||
<style name="itemBackground">
|
||||
|
@ -209,4 +209,34 @@
|
|||
<style name="divider.dark">
|
||||
<item name="android:divider">@drawable/divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="profileCount">
|
||||
<item name="android:background">@color/item_background</item>
|
||||
<item name="android:textColor">@color/darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="profileCount.dark">
|
||||
<item name="android:background">@color/dark_item_background</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="profileActivityList">
|
||||
<item name="android:background">@color/item_background</item>
|
||||
<item name="android:divider">@drawable/divider_light</item>
|
||||
</style>
|
||||
|
||||
<style name="profileActivityList.dark">
|
||||
<item name="android:background">@color/dark_item_background</item>
|
||||
<item name="android:divider">@drawable/divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="profileActivityRow">
|
||||
<item name="android:textColorLink">@color/linkblue</item>
|
||||
<item name="android:textColor">@color/darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="profileActivityRow.dark">
|
||||
<item name="android:textColorLink">@color/dark_linkblue</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
<item name="folderBorderTop">@style/folderBorderTop</item>
|
||||
<item name="folderBorderBottom">@style/folderBorderBottom</item>
|
||||
<item name="divider">@style/divider</item>
|
||||
<item name="profileCount">@style/profileCount</item>
|
||||
<item name="profileActivityList">@style/profileActivityList</item>
|
||||
<item name="profileActivityRow">@style/profileActivityRow</item>
|
||||
</style>
|
||||
|
||||
<style name="NewsBlurDarkTheme" parent="@android:style/Theme.Holo" >
|
||||
|
@ -52,5 +55,8 @@
|
|||
<item name="folderBorderTop">@style/folderBorderTop.dark</item>
|
||||
<item name="folderBorderBottom">@style/folderBorderBottom.dark</item>
|
||||
<item name="divider">@style/divider.dark</item>
|
||||
<item name="profileCount">@style/profileCount.dark</item>
|
||||
<item name="profileActivityList">@style/profileActivityList.dark</item>
|
||||
<item name="profileActivityRow">@style/profileActivityRow.dark</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.newsblur.activity.Profile;
|
|||
import com.newsblur.domain.UserDetails;
|
||||
import com.newsblur.network.domain.ActivitiesResponse;
|
||||
import com.newsblur.util.ImageLoader;
|
||||
import com.newsblur.util.PrefsUtils;
|
||||
|
||||
public class ActivitiesAdapter extends ArrayAdapter<ActivitiesResponse> {
|
||||
|
||||
|
@ -52,9 +53,14 @@ public class ActivitiesAdapter extends ArrayAdapter<ActivitiesResponse> {
|
|||
sharedStory = resources.getString(R.string.profile_shared_story);
|
||||
withComment = resources.getString(R.string.profile_with_comment);
|
||||
ago = resources.getString(R.string.profile_ago);
|
||||
|
||||
highlight = new ForegroundColorSpan(resources.getColor(R.color.linkblue));
|
||||
darkgray = new ForegroundColorSpan(resources.getColor(R.color.darkgray));
|
||||
|
||||
if (PrefsUtils.isLightThemeSelected(context)) {
|
||||
highlight = new ForegroundColorSpan(resources.getColor(R.color.linkblue));
|
||||
darkgray = new ForegroundColorSpan(resources.getColor(R.color.darkgray));
|
||||
} else {
|
||||
highlight = new ForegroundColorSpan(resources.getColor(R.color.dark_linkblue));
|
||||
darkgray = new ForegroundColorSpan(resources.getColor(R.color.white));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue