Moved some images, prototyped row with a stripe.

This commit is contained in:
RyanBateman 2012-07-06 14:50:26 -04:00
parent d6df6945de
commit fa2db823ef
25 changed files with 168 additions and 55 deletions

View file

@ -28,7 +28,8 @@
<activity
android:name=".activity.Main"
android:label="@string/newsblur" />
android:label="@string/newsblur"
android:hardwareAccelerated="false" />
<activity
android:name=".activity.Profile"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient
android:startColor="#00000000"
android:centerColor="#FFFFFFFF"
android:endColor="#00000000"
android:angle="0" />
</shape>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/lightgray" />
</shape>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/lightgray" />
</shape>

View file

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/negative"/>
</shape>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/neutral" />
</shape>

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/positive"/>
</shape>

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

View file

@ -3,5 +3,6 @@
android:id="@+id/folderfeed_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:childDivider="@color/white"
android:dividerHeight="1px"
/>

View file

@ -7,27 +7,8 @@
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="@+id/row_feedname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="70dp"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="16dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/row_feedfavicon"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_centerVertical="true"
android:layout_marginLeft="40dp"
android:contentDescription="@string/description_favicon" />
<LinearLayout
android:id="@+id/row_feedcounters"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
@ -37,36 +18,58 @@
<TextView
android:id="@+id/row_feednegative"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:background="@drawable/negative_count_circle"
android:gravity="center"
android:textColor="@color/white"
android:textSize="10dp"
android:textSize="12dp"
android:textStyle="bold" />
<TextView
android:id="@+id/row_feedneutral"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:background="@drawable/neutral_count_circle"
android:gravity="center"
android:textColor="@color/white"
android:textSize="10dp"
android:textSize="12dp"
android:textStyle="bold" />
<TextView
android:id="@+id/row_feedpositive"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:background="@drawable/positive_count_circle"
android:gravity="center"
android:textColor="@color/white"
android:textSize="10dp"
android:textSize="12dp"
android:textStyle="bold" />
</LinearLayout>
<com.newsblur.view.RoundedImageView
android:id="@+id/row_feedfavicon"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:contentDescription="@string/description_favicon" />
<TextView
android:id="@+id/row_feedname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_toLeftOf="@id/row_feedcounters"
android:layout_toRightOf="@id/row_feedfavicon"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="16dp" />
</RelativeLayout>

View file

@ -0,0 +1,77 @@
<?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="40dp"
android:background="@color/white"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/row_feedcounters"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="right"
android:orientation="horizontal" >
<TextView
android:id="@+id/row_feednegative"
android:layout_width="10dp"
android:layout_height="fill_parent"
android:background="@drawable/negative_count_stripe"
android:gravity="center"
android:textColor="@color/white"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:textSize="8dp"
android:textStyle="bold" />
<TextView
android:id="@+id/row_feedneutral"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/neutral_count_stripe"
android:gravity="center"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textColor="@color/white"
android:textSize="10dp"
android:textStyle="bold" />
<TextView
android:id="@+id/row_feedpositive"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/positive_count_stripe"
android:gravity="center"
android:textColor="@color/white"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14dp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/row_feedname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="50dp"
android:layout_marginRight="5dp"
android:layout_toLeftOf="@id/row_feedcounters"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="16dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/row_feedfavicon"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:alpha="0.7"
android:contentDescription="@string/description_favicon" />
</RelativeLayout>

View file

@ -1,20 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:orientation="horizontal"
android:background="@color/lightgray">
<ImageView
android:layout_height="20dp"
android:layout_width="20dp"
android:src="@drawable/folder"
android:layout_margin="10dp"
android:contentDescription="@string/description_row_folder_icon"/>
<TextView
android:id="@+id/row_foldername"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18dp"
android:layout_height="fill_parent"
android:textSize="16dp"
android:textAllCaps="true"
android:textStyle="bold"
android:layout_marginLeft="40dp"
android:textColor="@color/darkgray" />
android:gravity="center_vertical"
android:textColor="@color/darkgray" />
</RelativeLayout>
</LinearLayout>

View file

@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:orientation="horizontal"
android:background="@color/lightgray">
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/folder"
android:layout_margin="10dp" android:contentDescription="@string/description_row_folder_icon"/>
<TextView
android:id="@+id/row_foldername"
@ -17,4 +21,4 @@
android:layout_marginLeft="30dp"
android:textColor="@color/darkgray" />
</RelativeLayout>
</LinearLayout>

View file

@ -21,6 +21,7 @@
<string name="description_signup_button">Press to sign up</string>
<string name="description_favicon">The feed\'s favicon</string>
<string name="description_profile_picture">The user\'s profile picture</string>
<string name="description_row_folder_icon">folder icon</string>
<string name="menu_profile">Profile</string>
<string name="menu_refresh">Refresh</string>
@ -32,4 +33,5 @@
<string name="profile_shared">shared</string>
<string name="profile_subscribers">subscribers</string>
</resources>

View file

@ -2,8 +2,10 @@ package com.newsblur.fragment;
import android.content.ContentResolver;
import android.database.Cursor;
import android.graphics.Point;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -17,7 +19,6 @@ import com.newsblur.view.FolderTreeViewBinder;
public class FolderFeedListFragment extends Fragment {
private ExpandableListView list;
private ContentResolver resolver;
private FolderTreeAdapter folderAdapter;
@ -41,6 +42,13 @@ public class FolderFeedListFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_folderfeedlist, container);
list = (ExpandableListView) v.findViewById(R.id.folderfeed_list);
Display display = getActivity().getWindowManager().getDefaultDisplay();
int width = display.getWidth();
list.setIndicatorBounds(width - 50, width - 10);
list.setChildDivider(getActivity().getResources().getDrawable(R.drawable.divider_light));
list.setAdapter(folderAdapter);
return v;

View file

@ -23,7 +23,7 @@ public class RoundedImageView extends ImageView {
// TODO: Fix this to use proper anti-aliasing for the corners
protected void onDraw(Canvas canvas) {
clipPath.addRoundRect(new RectF(0, 0, getWidth(), getHeight()), getWidth() / 12, getWidth() / 12, Path.Direction.CW);
clipPath.addRoundRect(new RectF(0, 0, getWidth(), getHeight()), getWidth() / 10, getWidth() / 10, Path.Direction.CW);
canvas.clipPath(clipPath);
super.onDraw(canvas);
};