removed 3-column-layout with taskedit, now 2column. Also handling of the Astrid-logo-button as up-button.

pull/14/head
Arne Jans 13 years ago
parent 28a339467f
commit 247ba627bd

@ -4,22 +4,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.todoroo.astrid.activity.FilterListActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/filterlist_fragment"
android:layout_weight="33">
<!-- Preview: layout=@layout/filter_list_activity -->
</fragment>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.todoroo.astrid.activity.TaskListActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/tasklist_fragment"
android:layout_weight="33">
android:layout_weight="67">
<!-- Preview: layout=@layout/task_list_activity -->
</fragment>
<fragment

@ -32,7 +32,6 @@
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>

@ -256,11 +256,12 @@ public class FilterListActivity extends ExpandableListFragment {
item = menu.add(Menu.NONE, MENU_NEW_FILTER_ID, Menu.NONE,
R.string.FLA_new_filter);
item.setIcon(android.R.drawable.ic_menu_add);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
item = menu.add(Menu.NONE, MENU_SEARCH_ID, Menu.NONE,
R.string.FLA_menu_search);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
item.setIcon(android.R.drawable.ic_menu_search);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
item = menu.add(Menu.NONE, MENU_REFRESH_ID, Menu.NONE,
R.string.TLA_menu_sync);
@ -470,6 +471,10 @@ public class FilterListActivity extends ExpandableListFragment {
startActivityForResult(intent, REQUEST_CUSTOM_INTENT);
return true;
}
case android.R.id.home: {
// TODO: maybe invoke a dashboard later
return true;
}
default: {
TaskListActivity tasklist = (TaskListActivity) getSupportFragmentManager()
.findFragmentById(R.id.tasklist_fragment);

@ -863,6 +863,9 @@ public final class TaskEditActivity extends Fragment {
case MENU_DELETE_ID:
deleteButtonClick();
return true;
case android.R.id.home:
saveButtonClick();
return true;
}
return super.onOptionsItemSelected(item);
@ -875,12 +878,15 @@ public final class TaskEditActivity extends Fragment {
item = menu.add(Menu.NONE, MENU_SAVE_ID, 0, R.string.TEA_menu_save);
item.setIcon(android.R.drawable.ic_menu_save);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
item = menu.add(Menu.NONE, MENU_DISCARD_ID, 0, R.string.TEA_menu_discard);
item.setIcon(android.R.drawable.ic_menu_close_clear_cancel);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
item = menu.add(Menu.NONE, MENU_DELETE_ID, 0, R.string.TEA_menu_delete);
item.setIcon(android.R.drawable.ic_menu_delete);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
}
@Override

@ -389,6 +389,7 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
item = menu.add(Menu.NONE, MENU_SORT_ID, Menu.NONE,
R.string.TLA_menu_sort);
item.setIcon(android.R.drawable.ic_menu_sort_by_size);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
}
addSyncRefreshMenuItem(menu);
@ -397,7 +398,6 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
item = menu.add(Menu.NONE, MENU_LISTS_ID, Menu.NONE,
R.string.tag_TLA_menu);
item.setIcon(R.drawable.ic_menu_lists);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
}
if(!Constants.MARKET_DISABLED) {
@ -1277,6 +1277,13 @@ public class TaskListActivity extends ListFragment implements OnScrollListener,
intent = item.getIntent();
AndroidUtilities.startExternalIntent(getActivity(), intent, ACTIVITY_MENU_EXTERNAL);
return true;
case android.R.id.home: {
if (!mDualFragments) {
// switch back to the filterlist
showFilterListActivity();
}
return true;
}
// --- context menu items

@ -99,10 +99,7 @@
<style name="Theme.GreenDroid.NoTitleBar" parent="@style/Theme.GreenDroid">
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
Loading…
Cancel
Save