@ -0,0 +1,38 @@
|
|||||||
|
package com.todoroo.astrid.people;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import com.todoroo.astrid.adapter.FilterAdapter;
|
||||||
|
import com.todoroo.astrid.utility.Constants;
|
||||||
|
|
||||||
|
public class PeopleFilterAdapter extends FilterAdapter {
|
||||||
|
|
||||||
|
public static final String BROADCAST_REQUEST_PEOPLE_FILTERS = Constants.PACKAGE + ".REQUEST_PEOPLE_FILTERS"; //$NON-NLS-1$
|
||||||
|
public static final String BROADCAST_SEND_PEOPLE_FILTERS = Constants.PACKAGE + ".SEND_PEOPLE_FILTERS"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public PeopleFilterAdapter(Activity activity, ListView listView,
|
||||||
|
int rowLayout, boolean skipIntentFilters) {
|
||||||
|
super(activity, listView, rowLayout, skipIntentFilters);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getLists() {
|
||||||
|
Intent broadcastIntent = new Intent(BROADCAST_REQUEST_PEOPLE_FILTERS);
|
||||||
|
activity.sendBroadcast(broadcastIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerRecevier() {
|
||||||
|
IntentFilter peopleFilter = new IntentFilter(BROADCAST_SEND_PEOPLE_FILTERS);
|
||||||
|
activity.registerReceiver(filterReceiver, peopleFilter);
|
||||||
|
getLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unregisterRecevier() {
|
||||||
|
activity.unregisterReceiver(filterReceiver);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
package com.todoroo.astrid.people;
|
||||||
|
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import android.content.BroadcastReceiver;
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.ContentValues;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.timsu.astrid.R;
|
||||||
|
import com.todoroo.andlib.data.TodorooCursor;
|
||||||
|
import com.todoroo.andlib.service.ContextManager;
|
||||||
|
import com.todoroo.andlib.sql.Criterion;
|
||||||
|
import com.todoroo.andlib.sql.Field;
|
||||||
|
import com.todoroo.andlib.sql.Join;
|
||||||
|
import com.todoroo.andlib.sql.Order;
|
||||||
|
import com.todoroo.andlib.sql.Query;
|
||||||
|
import com.todoroo.andlib.sql.QueryTemplate;
|
||||||
|
import com.todoroo.andlib.utility.AndroidUtilities;
|
||||||
|
import com.todoroo.astrid.actfm.sync.ActFmSyncService;
|
||||||
|
import com.todoroo.astrid.api.AstridApiConstants;
|
||||||
|
import com.todoroo.astrid.api.Filter;
|
||||||
|
import com.todoroo.astrid.api.FilterListItem;
|
||||||
|
import com.todoroo.astrid.api.FilterWithCustomIntent;
|
||||||
|
import com.todoroo.astrid.api.FilterWithUpdate;
|
||||||
|
import com.todoroo.astrid.core.PluginServices;
|
||||||
|
import com.todoroo.astrid.data.Metadata;
|
||||||
|
import com.todoroo.astrid.data.TagData;
|
||||||
|
import com.todoroo.astrid.data.Task;
|
||||||
|
import com.todoroo.astrid.data.User;
|
||||||
|
import com.todoroo.astrid.tags.TagService;
|
||||||
|
|
||||||
|
public class PeopleFilterExposer extends BroadcastReceiver {
|
||||||
|
@Override
|
||||||
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
FilterListItem[] listAsArray = prepareFilters(context);
|
||||||
|
|
||||||
|
Intent broadcastIntent = new Intent(PeopleFilterAdapter.BROADCAST_SEND_PEOPLE_FILTERS);
|
||||||
|
broadcastIntent.putExtra(AstridApiConstants.EXTRAS_RESPONSE, listAsArray);
|
||||||
|
broadcastIntent.putExtra(AstridApiConstants.EXTRAS_ADDON, "people"); //$NON-NLS-1$
|
||||||
|
context.sendBroadcast(broadcastIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
private FilterListItem[] prepareFilters(Context context) {
|
||||||
|
TodorooCursor<User> users = PluginServices.getUserDao().query(Query.select(User.PROPERTIES)
|
||||||
|
.orderBy(Order.asc(User.NAME), Order.asc(User.EMAIL)));
|
||||||
|
try {
|
||||||
|
FilterListItem[] items = new FilterListItem[users.getCount() + 1];
|
||||||
|
items[0] = mySharedTasks(context);
|
||||||
|
User user = new User();
|
||||||
|
int i = 1;
|
||||||
|
for (users.moveToFirst(); !users.isAfterLast(); users.moveToNext()) {
|
||||||
|
user.readFromCursor(users);
|
||||||
|
Filter currFilter = filterFromUserData(user);
|
||||||
|
items[i] = currFilter;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
} finally {
|
||||||
|
users.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("nls")
|
||||||
|
public static FilterWithCustomIntent filterFromUserData(User user) {
|
||||||
|
String email = user.getValue(User.EMAIL);
|
||||||
|
|
||||||
|
String title = user.getDisplayName();
|
||||||
|
QueryTemplate userTemplate = new QueryTemplate().where(
|
||||||
|
Criterion.or(Task.USER.like("%" + email + "%"),
|
||||||
|
Task.USER_ID.eq(user.getValue(User.REMOTE_ID))));
|
||||||
|
|
||||||
|
FilterWithUpdate filter = new FilterWithUpdate(title, title, userTemplate, null);
|
||||||
|
|
||||||
|
filter.customTaskList = new ComponentName(ContextManager.getContext(), PersonViewFragment.class);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
values.put(Task.USER_ID.name, user.getValue(User.REMOTE_ID));
|
||||||
|
try {
|
||||||
|
JSONObject userJson = new JSONObject();
|
||||||
|
ActFmSyncService.JsonHelper.jsonFromUser(userJson, user);
|
||||||
|
values.put(Task.USER.name, userJson.toString());
|
||||||
|
} catch (JSONException e) {
|
||||||
|
// Ignored
|
||||||
|
}
|
||||||
|
filter.valuesForNewTasks = values;
|
||||||
|
|
||||||
|
String imageUrl = user.getValue(User.PICTURE);
|
||||||
|
filter.imageUrl = imageUrl;
|
||||||
|
|
||||||
|
Bundle extras = new Bundle();
|
||||||
|
extras.putLong(PersonViewFragment.EXTRA_USER_ID_LOCAL, user.getId());
|
||||||
|
filter.customExtras = extras;
|
||||||
|
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("nls")
|
||||||
|
public static FilterWithCustomIntent mySharedTasks(Context context) {
|
||||||
|
AndroidUtilities.copyDatabases(context, "/sdcard/databases");
|
||||||
|
TodorooCursor<TagData> tagsWithMembers = PluginServices.getTagDataService()
|
||||||
|
.query(Query.select(TagData.NAME, TagData.MEMBERS).where(TagData.MEMBER_COUNT.gt(0)));
|
||||||
|
String[] names;
|
||||||
|
try {
|
||||||
|
if (tagsWithMembers.getCount() == 0) {
|
||||||
|
names = new String[1];
|
||||||
|
names[0] = "\"\"";
|
||||||
|
} else {
|
||||||
|
names = new String[tagsWithMembers.getCount()];
|
||||||
|
TagData curr = new TagData();
|
||||||
|
int i = 0;
|
||||||
|
for (tagsWithMembers.moveToFirst(); !tagsWithMembers.isAfterLast(); tagsWithMembers.moveToNext()) {
|
||||||
|
curr.readFromCursor(tagsWithMembers);
|
||||||
|
names[i] = "\"" + curr.getValue(TagData.NAME) + "\"";
|
||||||
|
System.err.println("Tag data " + curr.getValue(TagData.NAME) + " has members " + curr.getValue(TagData.MEMBERS));
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
tagsWithMembers.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
String title = context.getString(R.string.actfm_my_shared_tasks_title);
|
||||||
|
QueryTemplate template = new QueryTemplate().join(Join.inner(Metadata.TABLE.as("mtags"),
|
||||||
|
Criterion.and(Task.ID.eq(Field.field("mtags." + Metadata.TASK.name)),
|
||||||
|
Field.field("mtags." + Metadata.KEY.name).eq(TagService.KEY),
|
||||||
|
Field.field("mtags." + TagService.TAG.name).in(names))));
|
||||||
|
|
||||||
|
FilterWithUpdate filter = new FilterWithUpdate(title, title, template, null);
|
||||||
|
|
||||||
|
filter.customTaskList = new ComponentName(ContextManager.getContext(), PersonViewFragment.class);
|
||||||
|
|
||||||
|
Bundle extras = new Bundle();
|
||||||
|
extras.putBoolean(PersonViewFragment.EXTRA_HIDE_QUICK_ADD, true);
|
||||||
|
filter.customExtras = extras;
|
||||||
|
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.todoroo.astrid.people;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
|
||||||
|
import com.timsu.astrid.R;
|
||||||
|
import com.todoroo.andlib.utility.AndroidUtilities;
|
||||||
|
import com.todoroo.astrid.activity.FilterListFragment;
|
||||||
|
import com.todoroo.astrid.adapter.FilterAdapter;
|
||||||
|
|
||||||
|
public class PeopleListFragment extends FilterListFragment {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected FilterAdapter instantiateAdapter() {
|
||||||
|
return new PeopleFilterAdapter(getActivity(), null, R.layout.filter_adapter_row, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayout(Activity activity) {
|
||||||
|
if (AndroidUtilities.isTabletSized(activity))
|
||||||
|
return R.layout.people_list_fragment_3pane;
|
||||||
|
else
|
||||||
|
return R.layout.people_list_fragment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package com.todoroo.astrid.people;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.timsu.astrid.R;
|
||||||
|
import com.todoroo.andlib.utility.AndroidUtilities;
|
||||||
|
import com.todoroo.astrid.activity.FilterListFragment;
|
||||||
|
import com.todoroo.astrid.activity.TaskListActivity;
|
||||||
|
import com.todoroo.astrid.activity.TaskListFragment;
|
||||||
|
import com.todoroo.astrid.api.Filter;
|
||||||
|
import com.todoroo.astrid.api.FilterListItem;
|
||||||
|
import com.todoroo.astrid.api.FilterWithUpdate;
|
||||||
|
import com.todoroo.astrid.helper.AsyncImageView;
|
||||||
|
import com.todoroo.astrid.ui.MainMenuPopover;
|
||||||
|
|
||||||
|
public class PeopleViewActivity extends TaskListActivity {
|
||||||
|
|
||||||
|
private AsyncImageView imageView;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
imageView = (AsyncImageView) findViewById(R.id.person_image);
|
||||||
|
imageView.setDefaultImageResource(R.drawable.icn_default_person_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getContentView() {
|
||||||
|
return R.layout.people_view_wrapper_activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Filter getDefaultFilter() {
|
||||||
|
return PeopleFilterExposer.mySharedTasks(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<? extends FilterListFragment> getFilterListClass() {
|
||||||
|
return PeopleListFragment.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHeaderView() {
|
||||||
|
return R.layout.header_people_view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onFilterItemClicked(FilterListItem item) {
|
||||||
|
boolean result = super.onFilterItemClicked(item);
|
||||||
|
if (result && item instanceof FilterWithUpdate)
|
||||||
|
imageView.setUrl(((FilterWithUpdate) item).imageUrl);
|
||||||
|
else
|
||||||
|
imageView.setUrl(null);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int[] FORBIDDEN_MENU_ITEMS = {
|
||||||
|
TaskListFragment.MENU_NEW_FILTER_ID,
|
||||||
|
TaskListFragment.MENU_ADDONS_ID,
|
||||||
|
MainMenuPopover.MAIN_MENU_ITEM_FRIENDS
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldAddMenuItem(int itemId) {
|
||||||
|
return AndroidUtilities.indexOf(FORBIDDEN_MENU_ITEMS, itemId) < 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mainMenuItemSelected(int item, Intent customIntent) {
|
||||||
|
if (item == MainMenuPopover.MAIN_MENU_ITEM_LISTS) {
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.mainMenuItemSelected(item, customIntent);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,129 @@
|
|||||||
|
package com.todoroo.astrid.people;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.support.v4.view.Menu;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.timsu.astrid.R;
|
||||||
|
import com.todoroo.andlib.service.Autowired;
|
||||||
|
import com.todoroo.andlib.service.ContextManager;
|
||||||
|
import com.todoroo.andlib.utility.DateUtilities;
|
||||||
|
import com.todoroo.andlib.utility.Preferences;
|
||||||
|
import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
|
||||||
|
import com.todoroo.astrid.activity.TaskListFragment;
|
||||||
|
import com.todoroo.astrid.api.AstridApiConstants;
|
||||||
|
import com.todoroo.astrid.dao.UserDao;
|
||||||
|
import com.todoroo.astrid.data.User;
|
||||||
|
import com.todoroo.astrid.helper.ProgressBarSyncResultCallback;
|
||||||
|
import com.todoroo.astrid.service.SyncV2Service;
|
||||||
|
import com.todoroo.astrid.service.ThemeService;
|
||||||
|
|
||||||
|
public class PersonViewFragment extends TaskListFragment {
|
||||||
|
|
||||||
|
public static final String EXTRA_USER_ID_LOCAL = "user_local_id"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public static final String EXTRA_HIDE_QUICK_ADD = "hide_quickAdd"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
private static final String LAST_FETCH_KEY = "actfm_last_user_"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
protected static final int MENU_REFRESH_ID = MENU_SUPPORT_ID + 1;
|
||||||
|
|
||||||
|
@Autowired UserDao userDao;
|
||||||
|
|
||||||
|
@Autowired SyncV2Service syncService;
|
||||||
|
|
||||||
|
@Autowired ActFmPreferenceService actFmPreferenceService;
|
||||||
|
|
||||||
|
protected View taskListView;
|
||||||
|
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected View getListBody(ViewGroup root) {
|
||||||
|
ViewGroup parent = (ViewGroup) getActivity().getLayoutInflater().inflate(R.layout.task_list_body_person, root, false);
|
||||||
|
|
||||||
|
taskListView = super.getListBody(parent);
|
||||||
|
parent.addView(taskListView);
|
||||||
|
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initializeData() {
|
||||||
|
super.initializeData();
|
||||||
|
if (extras.containsKey(EXTRA_USER_ID_LOCAL)) {
|
||||||
|
user = userDao.fetch(extras.getLong(EXTRA_USER_ID_LOCAL), User.PROPERTIES);
|
||||||
|
}
|
||||||
|
((TextView)taskListView.findViewById(android.R.id.empty)).setText(getEmptyDisplayString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setupQuickAddBar() {
|
||||||
|
super.setupQuickAddBar();
|
||||||
|
quickAddBar.setUsePeopleControl(false);
|
||||||
|
if (user != null)
|
||||||
|
quickAddBar.getQuickAddBox().setHint(getString(R.string.TLA_quick_add_hint_assign, user.getDisplayName()));
|
||||||
|
|
||||||
|
if (extras.containsKey(EXTRA_HIDE_QUICK_ADD))
|
||||||
|
quickAddBar.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addSyncRefreshMenuItem(Menu menu, int themeFlags) {
|
||||||
|
if(actFmPreferenceService.isLoggedIn()) {
|
||||||
|
addMenuItem(menu, R.string.actfm_TVA_menu_refresh,
|
||||||
|
ThemeService.getDrawable(R.drawable.icn_menu_refresh, themeFlags), MENU_REFRESH_ID, true);
|
||||||
|
} else {
|
||||||
|
super.addSyncRefreshMenuItem(menu, themeFlags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handleOptionsMenuItemSelected(int id, Intent intent) {
|
||||||
|
switch (id) {
|
||||||
|
case MENU_REFRESH_ID:
|
||||||
|
refreshData(true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.handleOptionsMenuItemSelected(id, intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initiateAutomaticSyncImpl() {
|
||||||
|
if (!isCurrentTaskListFragment())
|
||||||
|
return;
|
||||||
|
if (user != null) {
|
||||||
|
long lastAutoSync = Preferences.getLong(LAST_FETCH_KEY + user.getId(), 0);
|
||||||
|
if (DateUtilities.now() - lastAutoSync > DateUtilities.ONE_HOUR)
|
||||||
|
refreshData(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshData(final boolean manual) {
|
||||||
|
if (user != null) {
|
||||||
|
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.DLG_loading);
|
||||||
|
|
||||||
|
syncService.synchronizeList(user, manual, new ProgressBarSyncResultCallback(getActivity(), this,
|
||||||
|
R.id.progressBar, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (manual)
|
||||||
|
ContextManager.getContext().sendBroadcast(new Intent(AstridApiConstants.BROADCAST_EVENT_REFRESH));
|
||||||
|
else
|
||||||
|
refresh();
|
||||||
|
((TextView)taskListView.findViewById(android.R.id.empty)).setText(getEmptyDisplayString());
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getEmptyDisplayString() {
|
||||||
|
String userName = user != null ? user.getDisplayName() : null;
|
||||||
|
return TextUtils.isEmpty(userName) ? getString(R.string.actfm_my_shared_tasks_empty) : getString(R.string.TLA_no_items_person, userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<item android:state_selected="false" android:drawable="@drawable/people_menu_button_blue_off"/>
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/people_menu_button_blue_on"/>
|
||||||
|
</selector>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<item android:state_selected="false" android:drawable="@drawable/people_menu_button_dark_blue_off"/>
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/people_menu_button_dark_blue_on"/>
|
||||||
|
</selector>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<item android:state_selected="false" android:drawable="@drawable/people_menu_button_red_off"/>
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/people_menu_button_red_on"/>
|
||||||
|
</selector>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_menu"
|
||||||
|
android:layout_width="51dip"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:src="?attr/asPeopleMenu"
|
||||||
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="-1px"
|
||||||
|
android:background="?attr/asSeparatorBackground"
|
||||||
|
android:layout_marginBottom="4dip"
|
||||||
|
android:layout_marginTop="4dip"/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/lists_nav"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="5dip"
|
||||||
|
android:paddingRight="5dip"
|
||||||
|
android:paddingLeft="5dip"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/list_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/BFE_Active"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
style="@style/TextAppearance.ActionBar_ListsHeader"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/list_disclosure_arrow"
|
||||||
|
android:layout_width="12dip"
|
||||||
|
android:layout_height="12dip"
|
||||||
|
android:layout_marginLeft="10dip"
|
||||||
|
android:layout_toRightOf="@id/list_title"
|
||||||
|
android:layout_alignBottom="@id/list_title"
|
||||||
|
android:src="?attr/asListsDisclosure"
|
||||||
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.todoroo.astrid.helper.AsyncImageView
|
||||||
|
android:id="@+id/person_image"
|
||||||
|
android:layout_width="51dip"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:scaleType="centerCrop"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/comments"
|
||||||
|
android:layout_width="51dip"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:background="?attr/asCommentButtonImg"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:paddingBottom="6dip"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?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="wrap_content"
|
||||||
|
android:background="?attr/asListPopoverBg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- List -->
|
||||||
|
<ListView android:id="@android:id/list"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="370dip"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:divider="@android:color/transparent"
|
||||||
|
android:cacheColorHint="#00000000"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?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="wrap_content"
|
||||||
|
android:background="?attr/asListPopoverBg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- List -->
|
||||||
|
<ListView android:id="@android:id/list"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:divider="@android:color/transparent"
|
||||||
|
android:cacheColorHint="#00000000"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
style="@style/Content"
|
||||||
|
android:id="@+id/tasklist_fragment_container">
|
||||||
|
</FrameLayout>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="100">
|
||||||
|
|
||||||
|
<!-- List body goes here -->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||