Polished custom menu icons for all screen sizes and layouts (images still unpolished)

pull/14/head
Sam Bosley 13 years ago
parent 2b930a7a0e
commit 1514568de4

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="280dip"
android:layout_height="220dip"
android:layout_below="@+id/gdi_arrow_up"
android:background="?attr/asListPopoverBg">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/topFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/content"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/bottomFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
</LinearLayout>
</ScrollView>
</merge>

@ -5,37 +5,7 @@
android:layout_height="wrap_content"
android:paddingLeft="10dip">
<ScrollView
android:layout_width="280dip"
android:layout_height="340dip"
android:layout_below="@+id/gdi_arrow_up"
android:background="?attr/asListPopoverBg">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/topFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/content"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/bottomFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
</LinearLayout>
</ScrollView>
<include layout="@layout/main_menu_popover_body"/>
<ImageView
android:id="@+id/gdi_arrow_up"

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="280dip"
android:layout_height="380dip"
android:layout_below="@+id/gdi_arrow_up"
android:background="?attr/asListPopoverBg">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/topFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/content"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/bottomFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
</LinearLayout>
</ScrollView>
</merge>

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="280dip"
android:layout_height="wrap_content"
android:layout_below="@+id/gdi_arrow_up"
android:background="@drawable/list_popover_bg_white">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/topFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/content"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
<include layout="@layout/fla_separator"/>
<LinearLayout
android:id="@+id/bottomFixedItems"
android:layout_width="280dip"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"/>
</LinearLayout>
</ScrollView>
</merge>

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dip">
<include layout="@layout/main_menu_popover_body_tablet"/>
<ImageView
android:id="@+id/gdi_arrow_up"
android:layout_width="27dip"
android:layout_height="27dip"
android:layout_marginLeft="-10dip"
android:scaleType="fitCenter"
android:layout_marginBottom="-8dip"
android:src="@drawable/list_arrow_up_white" />
<ImageView
android:id="@+id/gdi_arrow_down"
android:layout_width="27dip"
android:layout_height="27dip"
android:scaleType="fitCenter"
android:layout_marginBottom="-8dip"
android:layout_below="@android:id/list"/>
</RelativeLayout>

@ -2,8 +2,8 @@
<!-- See the file "LICENSE" for the full license governing this code. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="60dip"
android:minHeight="60dip"
android:layout_height="44dip"
android:minHeight="44dip"
android:background="@android:drawable/list_selector_background"
android:paddingTop="5dip"
android:paddingBottom="5dip"

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="44dip"
android:minHeight="44dip"
android:background="@android:drawable/list_selector_background"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:paddingRight="6dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- filter icon -->
<ImageView android:id="@+id/icon"
android:layout_width="36dip"
android:layout_height="36dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="12dip"
android:scaleType="fitCenter"/>
<!-- filter name -->
<TextView android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="12dp"
android:paddingRight="30dp"
android:checked="false"
android:gravity="center_vertical"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="#000000"/>
</LinearLayout>

@ -226,7 +226,13 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
}
private void createMainMenuPopover() {
mainMenuPopover = new MainMenuPopover(this, R.layout.main_menu_popover, (fragmentLayout != LAYOUT_SINGLE));
int layout;
if (shouldUseThreePane(this))
layout = R.layout.main_menu_popover_tablet;
else
layout = R.layout.main_menu_popover;
mainMenuPopover = new MainMenuPopover(this, layout, (fragmentLayout != LAYOUT_SINGLE));
mainMenuPopover.setMenuListener(this);
mainMenuPopover.setOnDismissListener(new OnDismissListener() {
@Override

@ -12,6 +12,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.timsu.astrid.R;
import com.todoroo.astrid.activity.AstridActivity;
public class MainMenuPopover extends FragmentPopover {
@ -31,6 +32,7 @@ public class MainMenuPopover extends FragmentPopover {
private final LinearLayout content;
private final LinearLayout topFixed;
private final LinearLayout bottomFixed;
private final int rowLayout;
public void setMenuListener(MainMenuListener listener) {
this.mListener = listener;
@ -39,6 +41,11 @@ public class MainMenuPopover extends FragmentPopover {
public MainMenuPopover(Context context, int layout, boolean isTablet) {
super(context, layout);
if (AstridActivity.shouldUseThreePane(context))
rowLayout = R.layout.main_menu_row_tablet;
else
rowLayout = R.layout.main_menu_row;
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
content = (LinearLayout) getContentView().findViewById(R.id.content);
@ -111,7 +118,7 @@ public class MainMenuPopover extends FragmentPopover {
}
private View setupItemWithParams(int title, int imageRes) {
View itemRow = inflater.inflate(R.layout.main_menu_row, null);
View itemRow = inflater.inflate(rowLayout, null);
ImageView image = (ImageView) itemRow.findViewById(R.id.icon);
image.setImageResource(imageRes);
@ -123,7 +130,7 @@ public class MainMenuPopover extends FragmentPopover {
}
private View setupItemWithParams(CharSequence title, Drawable imageDrawable) {
View itemRow = inflater.inflate(R.layout.main_menu_row, null);
View itemRow = inflater.inflate(rowLayout, null);
ImageView image = (ImageView) itemRow.findViewById(R.id.icon);
image.setImageDrawable(imageDrawable);

Loading…
Cancel
Save