Permalink
Browse files

added dialog class

  • Loading branch information...
1 parent 6dde81f commit ef0b6c916efd93f439fd9106f0f22babdd3b046a @ohlly ohlly committed Mar 7, 2013
Showing with 7 additions and 3 deletions.
  1. +6 −2 src/com/example/todolist/ItemView.java
  2. +1 −1 src/com/example/todolist/MyAdapter.java
@@ -1,5 +1,7 @@
package com.example.todolist;
+import java.util.ArrayList;
+
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
@@ -13,11 +15,12 @@
private static final String TAG = "ItemView";
private ToDoRow rowEntity = null;
+ private ArrayList<ToDoRow> rows;
- public ItemView(Context context, AttributeSet attr) {
+ public ItemView(Context context, AttributeSet attr, ArrayList<ToDoRow> _rows) {
super(context, attr);
-
+ rows = _rows;
String infService = Context.LAYOUT_INFLATER_SERVICE;
LayoutInflater inflater;
inflater = (LayoutInflater) getContext().getSystemService(infService);
@@ -59,6 +62,7 @@ public void onClick(View v) {
private OnLongClickListener longClickListener = new OnLongClickListener() {
public boolean onLongClick(View v) {
+ itemViewDialog itvd = new itemViewDialog();
// do something when the ItemView is longClicked
Log.v(TAG, "ItemView has been longClicked!");
@@ -53,7 +53,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
- itemView = new ItemView(this.context, null);
+ itemView = new ItemView(this.context, null, rows);
}
else {
itemView = (ItemView) convertView;

0 comments on commit ef0b6c9

Please sign in to comment.