|
@@ -18,6 +18,7 @@ import android.widget.TextView;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import de.tudarmstadt.informatik.hostage.Hostage;
|
|
|
import de.tudarmstadt.informatik.hostage.R;
|
|
|
import de.tudarmstadt.informatik.hostage.persistence.ProfileManager;
|
|
|
import de.tudarmstadt.informatik.hostage.model.Profile;
|
|
@@ -66,6 +67,18 @@ public class ProfileManagerListAdapter extends ArrayAdapter<Profile> {
|
|
|
|
|
|
if(item.mShowTooltip){
|
|
|
rowView = inflater.inflate(R.layout.profile_manager_list_item_help, parent, false);
|
|
|
+ rowView.findViewById(R.id.profile_manager_help_dismiss).setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ ProfileManagerListAdapter.this.remove(item);
|
|
|
+ ProfileManagerListAdapter.this.notifyDataSetChanged();
|
|
|
+ list.dismiss(position);
|
|
|
+
|
|
|
+ MainActivity.getContext().getSharedPreferences(
|
|
|
+ MainActivity.getContext().getString(R.string.shared_preference_path), Hostage.MODE_PRIVATE
|
|
|
+ ).edit().putBoolean("dismissedProfileSwipeHelp", true).commit();
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
if (rowView == null || rowView.getTag() == null) {
|
|
|
rowView = inflater.inflate(R.layout.profile_manager_list_item, parent, false);
|