Cleaned up some landscape layouts, fix animations for finishing main activities

pull/14/head
Sam Bosley 13 years ago
parent d3be9240ae
commit c09a28bfd3

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="@style/Content"
android:orientation="vertical">
<!-- Header -->
<LinearLayout
android:id="@+id/lists_header"
android:layout_width="fill_parent"
android:layout_height="43dip"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_alignParentTop="true"
style="@style/Header">
<!-- List Label -->
<TextView android:id="@+id/listLabel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_weight="100"
android:singleLine="true"
android:ellipsize="end"
android:gravity="center"
android:text="@string/FLA_title"
style="@style/TextAppearance.TLA_Header"/>
<ImageView android:id="@+id/back"
android:layout_width="43dip"
android:layout_height="fill_parent"
android:background="?attr/asHeaderButtonBackground"
android:padding="7dip"
android:src="@drawable/icn_tasks"
android:scaleType="fitCenter"
android:visibility="gone" />
</LinearLayout>
<!-- Footer -->
<LinearLayout
android:id="@+id/lists_footer"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_weight="1"
android:padding="5dip"
android:orientation="horizontal"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/new_list_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/footer_editbutton"
android:gravity="center"
android:text="@string/FLA_new_list"
android:textStyle="bold"
style="@style/TextAppearance.TEA_action"/>
</LinearLayout>
<!-- List -->
<ExpandableListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="100"
android:layout_below="@id/lists_header"
android:layout_above="@id/lists_footer"
android:scrollbars="vertical"
android:cacheColorHint="#00000000"/>
</RelativeLayout>

@ -13,6 +13,10 @@
android:layout_weight="67">
<!-- Preview: layout=@layout/filter_list_activity -->
</fragment>
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#000000"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.todoroo.astrid.activity.TaskListActivity"

@ -13,7 +13,11 @@
android:layout_weight="67">
<!-- Preview: layout=@layout/task_list_activity -->
</fragment>
<fragment
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#000000"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.todoroo.astrid.activity.TaskEditActivity"
android:layout_width="match_parent"

@ -0,0 +1,136 @@
<?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:id="@+id/taskListParent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="@style/Content"
android:orientation="vertical">
<!-- Header -->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="43dip"
android:layout_weight="1"
android:orientation="horizontal">
<!-- Filters Button -->
<ImageView android:id="@+id/back"
android:layout_width="43dip"
android:layout_height="fill_parent"
android:background="?attr/asHeaderButtonBackground"
android:padding="7dip"
android:src="@drawable/icn_lists"
android:scaleType="fitCenter"
android:visibility="gone" />
<LinearLayout
style="@style/Header"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="horizontal">
<!-- List Label -->
<TextView android:id="@+id/listLabel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_weight="100"
android:singleLine="true"
android:ellipsize="end"
android:gravity="center"
style="@style/TextAppearance.TLA_Header"/>
</LinearLayout>
<LinearLayout android:id="@+id/activityContainer"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:visibility="gone">
<View
android:layout_width="0.5dip"
android:layout_height="fill_parent"
android:background="#ff222222"/>
<ImageView android:id="@+id/activity"
android:layout_height="fill_parent"
android:layout_width="43dip"
android:background="?attr/asHeaderButtonBackground"
android:padding="7dip"
android:src="@drawable/icn_cmmt_off"
android:scaleType="fitCenter" />
</LinearLayout>
<LinearLayout android:id="@+id/sortContainer"
android:layout_width="wrap_content"
android:layout_height="fill_parent">
<View
android:layout_width="0.5dip"
android:layout_height="fill_parent"
android:background="#ff222222"/>
<ImageView android:id="@+id/sort_settings"
android:layout_height="fill_parent"
android:layout_width="43dip"
android:background="?attr/asHeaderButtonBackground"
android:padding="7dip"
android:src="@drawable/ic_sort"
android:scaleType="fitCenter" />
</LinearLayout>
</LinearLayout>
<!-- Body goes here -->
<!-- Footer -->
<LinearLayout
android:id="@+id/taskListFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="47dip"
android:layout_weight="1"
android:background="@drawable/footer_background"
android:padding="3dip"
android:orientation="horizontal">
<!-- Voice Add Button -->
<ImageButton android:id="@+id/voiceAddButton"
android:layout_width="wrap_content"
android:layout_height="39dip"
android:layout_gravity="top"
android:layout_marginRight="3dip"
android:layout_weight="1"
android:visibility="gone"
android:background="@drawable/footer_button"
android:src="@drawable/ic_footer_mic"
android:scaleType="center"/>
<!-- Quick Add Task -->
<EditText android:id="@+id/quickAddText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="3dip"
android:layout_weight="100"
android:background="@drawable/footer_edittext"
android:hint="@string/TLA_quick_add_hint"
android:textSize="16sp"
android:autoText="true"
android:capitalize="sentences"/>
<!-- Extended Add Button -->
<ImageButton android:id="@+id/quickAddButton"
android:layout_width="wrap_content"
android:layout_height="39dip"
android:layout_gravity="top"
android:layout_marginRight="3dip"
android:layout_weight="1"
android:background="@drawable/footer_button"
android:src="@drawable/ic_footer_add"
android:scaleType="center"/>
</LinearLayout>
</LinearLayout>

@ -13,6 +13,10 @@
android:layout_weight="67">
<!-- Preview: layout=@layout/filter_list_activity -->
</fragment>
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#000000"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.todoroo.astrid.activity.TaskListActivity"

@ -199,9 +199,7 @@ public class FilterListActivity extends ExpandableListFragment {
public void onClick(View v) {
Intent intent = TagsPlugin.newTagDialog(getActivity());
startActivity(intent);
AndroidUtilities.callApiMethod(5, getActivity(), "overridePendingTransition",
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_left_in, R.anim.slide_left_out);
AndroidUtilities.callOverridePendingTransition(getActivity(), R.anim.slide_left_in, R.anim.slide_left_out);
}
});

@ -5,6 +5,7 @@ import android.support.v4.app.Fragment;
import android.widget.TextView;
import com.timsu.astrid.R;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.astrid.service.ThemeService;
public class FilterListWrapperActivity extends AstridWrapperActivity {
@ -42,4 +43,10 @@ public class FilterListWrapperActivity extends AstridWrapperActivity {
// update the actionbar-title
getSupportActionBar().setTitle(title);
}
@Override
public void finish() {
super.finish();
AndroidUtilities.callOverridePendingTransition(this, R.anim.slide_left_in, R.anim.slide_left_out);
}
}

@ -5,6 +5,7 @@ import android.support.v4.app.Fragment;
import android.view.KeyEvent;
import com.timsu.astrid.R;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.astrid.service.ThemeService;
public class TaskEditWrapperActivity extends AstridWrapperActivity {
@ -42,4 +43,10 @@ public class TaskEditWrapperActivity extends AstridWrapperActivity {
return frag.onKeyDown(keyCode, event);
return super.onKeyDown(keyCode, event);
}
@Override
public void finish() {
super.finish();
AndroidUtilities.callOverridePendingTransition(this, R.anim.slide_right_in, R.anim.slide_right_out);
}
}

@ -5,6 +5,7 @@ import android.support.v4.app.Fragment;
import android.widget.TextView;
import com.timsu.astrid.R;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.astrid.service.ThemeService;
public class TaskListWrapperActivity extends AstridWrapperActivity {
@ -41,4 +42,10 @@ public class TaskListWrapperActivity extends AstridWrapperActivity {
// update the actionbar-title
getSupportActionBar().setTitle(title);
}
@Override
public void finish() {
super.finish();
AndroidUtilities.callOverridePendingTransition(this, R.anim.slide_right_in, R.anim.slide_right_out);
}
}

Loading…
Cancel
Save