|
@@ -5,28 +5,26 @@ import android.content.Intent;
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewGroup;
|
|
-import android.view.animation.Animation;
|
|
|
|
-import android.view.animation.AnimationUtils;
|
|
|
|
import android.widget.ArrayAdapter;
|
|
import android.widget.ArrayAdapter;
|
|
import android.widget.ImageButton;
|
|
import android.widget.ImageButton;
|
|
import android.widget.ImageView;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
-import android.widget.ViewSwitcher;
|
|
|
|
|
|
|
|
import com.fortysevendeg.android.swipelistview.SwipeListView;
|
|
import com.fortysevendeg.android.swipelistview.SwipeListView;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
import de.tudarmstadt.informatik.hostage.R;
|
|
import de.tudarmstadt.informatik.hostage.R;
|
|
|
|
+import de.tudarmstadt.informatik.hostage.model.Profile;
|
|
import de.tudarmstadt.informatik.hostage.ui2.model.ProfileListItem;
|
|
import de.tudarmstadt.informatik.hostage.ui2.model.ProfileListItem;
|
|
-import de.tudarmstadt.informatik.hostage.ui2.preference.ProfileEditActivity;
|
|
|
|
|
|
+import de.tudarmstadt.informatik.hostage.ui2.activity.ProfileEditActivity;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author Alexander Brakowski
|
|
* @author Alexander Brakowski
|
|
* @created 14.01.14 18:00
|
|
* @created 14.01.14 18:00
|
|
*/
|
|
*/
|
|
-public class ProfileManagerListAdapter extends ArrayAdapter<ProfileListItem> {
|
|
|
|
|
|
+public class ProfileManagerListAdapter extends ArrayAdapter<Profile> {
|
|
private class ViewHolder {
|
|
private class ViewHolder {
|
|
public TextView labelView;
|
|
public TextView labelView;
|
|
public TextView textView;
|
|
public TextView textView;
|
|
@@ -37,9 +35,9 @@ public class ProfileManagerListAdapter extends ArrayAdapter<ProfileListItem> {
|
|
}
|
|
}
|
|
|
|
|
|
private final Context context;
|
|
private final Context context;
|
|
- private final List<ProfileListItem> values;
|
|
|
|
|
|
+ private final List<Profile> values;
|
|
|
|
|
|
- public ProfileManagerListAdapter(Context context, List<ProfileListItem> objects) {
|
|
|
|
|
|
+ public ProfileManagerListAdapter(Context context, List<Profile> objects) {
|
|
super(context, R.layout.profile_manager_list_item, objects);
|
|
super(context, R.layout.profile_manager_list_item, objects);
|
|
this.context = context;
|
|
this.context = context;
|
|
this.values = objects;
|
|
this.values = objects;
|
|
@@ -54,7 +52,7 @@ public class ProfileManagerListAdapter extends ArrayAdapter<ProfileListItem> {
|
|
View rowView = convertView;
|
|
View rowView = convertView;
|
|
ViewHolder holder = null;
|
|
ViewHolder holder = null;
|
|
|
|
|
|
- final ProfileListItem item = values.get(position);
|
|
|
|
|
|
+ final Profile item = values.get(position);
|
|
|
|
|
|
if(rowView == null){
|
|
if(rowView == null){
|
|
rowView = inflater.inflate(R.layout.profile_manager_list_item, parent, false);
|
|
rowView = inflater.inflate(R.layout.profile_manager_list_item, parent, false);
|
|
@@ -83,6 +81,7 @@ public class ProfileManagerListAdapter extends ArrayAdapter<ProfileListItem> {
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
Intent intent = new Intent(context, ProfileEditActivity.class);
|
|
Intent intent = new Intent(context, ProfileEditActivity.class);
|
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
+ intent.putExtra("profile_id", item.id);
|
|
context.startActivity(intent);
|
|
context.startActivity(intent);
|
|
}
|
|
}
|
|
});
|
|
});
|