diff --git a/android/BOINC/res/drawable-hdpi/ic_menu_delete.png b/android/BOINC/res/drawable-hdpi/ic_menu_delete.png
new file mode 100644
index 0000000000..24d8f6a4be
Binary files /dev/null and b/android/BOINC/res/drawable-hdpi/ic_menu_delete.png differ
diff --git a/android/BOINC/res/drawable-hdpi/ic_menu_refresh.png b/android/BOINC/res/drawable-hdpi/ic_menu_refresh.png
new file mode 100644
index 0000000000..e13315f5da
Binary files /dev/null and b/android/BOINC/res/drawable-hdpi/ic_menu_refresh.png differ
diff --git a/android/BOINC/res/drawable-ldpi/ic_menu_delete.png b/android/BOINC/res/drawable-ldpi/ic_menu_delete.png
new file mode 100644
index 0000000000..dbad3ddc84
Binary files /dev/null and b/android/BOINC/res/drawable-ldpi/ic_menu_delete.png differ
diff --git a/android/BOINC/res/drawable-ldpi/ic_menu_refresh.png b/android/BOINC/res/drawable-ldpi/ic_menu_refresh.png
new file mode 100644
index 0000000000..b25dc06161
Binary files /dev/null and b/android/BOINC/res/drawable-ldpi/ic_menu_refresh.png differ
diff --git a/android/BOINC/res/drawable-mdpi/ic_menu_delete.png b/android/BOINC/res/drawable-mdpi/ic_menu_delete.png
new file mode 100644
index 0000000000..e2c8700c34
Binary files /dev/null and b/android/BOINC/res/drawable-mdpi/ic_menu_delete.png differ
diff --git a/android/BOINC/res/drawable-mdpi/ic_menu_refresh.png b/android/BOINC/res/drawable-mdpi/ic_menu_refresh.png
new file mode 100644
index 0000000000..30b660fdfc
Binary files /dev/null and b/android/BOINC/res/drawable-mdpi/ic_menu_refresh.png differ
diff --git a/android/BOINC/res/drawable-xhdpi/ic_menu_delete.png b/android/BOINC/res/drawable-xhdpi/ic_menu_delete.png
new file mode 100644
index 0000000000..65b9caed1b
Binary files /dev/null and b/android/BOINC/res/drawable-xhdpi/ic_menu_delete.png differ
diff --git a/android/BOINC/res/drawable-xhdpi/ic_menu_refresh.png b/android/BOINC/res/drawable-xhdpi/ic_menu_refresh.png
new file mode 100644
index 0000000000..9e9f10ee88
Binary files /dev/null and b/android/BOINC/res/drawable-xhdpi/ic_menu_refresh.png differ
diff --git a/android/BOINC/res/layout/eventlog_layout_listitem.xml b/android/BOINC/res/layout/eventlog_layout_listitem.xml
index cf43dfe926..7712a679a5 100644
--- a/android/BOINC/res/layout/eventlog_layout_listitem.xml
+++ b/android/BOINC/res/layout/eventlog_layout_listitem.xml
@@ -30,7 +30,7 @@
android:clickable="false"
android:focusable="false" />
-
-
+ android:orientation="horizontal" >
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/BOINC/res/values/strings.xml b/android/BOINC/res/values/strings.xml
index 86b92be56f..de0e96e07b 100644
--- a/android/BOINC/res/values/strings.xml
+++ b/android/BOINC/res/values/strings.xml
@@ -131,7 +131,9 @@
Delete
Cancel
+ Add project
-
+ Delete project
+ Update project
+
new
waiting for download
diff --git a/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java b/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java
index dd572005db..2443b8146f 100644
--- a/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java
+++ b/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java
@@ -19,11 +19,8 @@
package edu.berkeley.boinc.adapter;
import java.util.ArrayList;
-import java.util.Date;
import edu.berkeley.boinc.R;
-import edu.berkeley.boinc.adapter.EventLogListAdapter.ViewEventLog;
-import edu.berkeley.boinc.rpc.Message;
import edu.berkeley.boinc.rpc.Project;
import android.app.Activity;
@@ -32,9 +29,9 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
-import android.widget.CheckBox;
import android.widget.ListView;
import android.widget.TextView;
+import android.widget.ImageButton;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
@@ -48,6 +45,8 @@ public class ProjectsListAdapter extends ArrayAdapter implements OnItem
int entryIndex;
TextView tvProjectName;
TextView tvUserName;
+ ImageButton ibProjectUpdate;
+ ImageButton ibProjectDelete;
}
public ProjectsListAdapter(Activity activity, ListView listView, int textViewResourceId, ArrayList entries) {
@@ -97,6 +96,8 @@ public class ProjectsListAdapter extends ArrayAdapter implements OnItem
viewProject = new ViewProject();
viewProject.tvProjectName = (TextView)vi.findViewById(R.id.project_name);
viewProject.tvUserName = (TextView)vi.findViewById(R.id.project_username);
+ viewProject.ibProjectUpdate = (ImageButton)vi.findViewById(R.id.project_update);
+ viewProject.ibProjectDelete = (ImageButton)vi.findViewById(R.id.project_delete);
vi.setTag(viewProject);
@@ -110,13 +111,18 @@ public class ProjectsListAdapter extends ArrayAdapter implements OnItem
viewProject.entryIndex = position;
viewProject.tvProjectName.setText(getProject(position));
viewProject.tvUserName.setText(getUserName(position));
+ if (listView.isItemChecked(position)) {
+ viewProject.ibProjectUpdate.setVisibility(View.VISIBLE);
+ viewProject.ibProjectDelete.setVisibility(View.VISIBLE);
+ } else {
+ viewProject.ibProjectUpdate.setVisibility(View.GONE);
+ viewProject.ibProjectDelete.setVisibility(View.GONE);
+ }
return vi;
}
public void onItemClick(AdapterView> adapter, View view, int position, long id ) {
- ViewProject viewProject = (ViewProject)view.getTag();
-
notifyDataSetChanged();
}