diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 7bd27ea..1c02558 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -7,11 +7,11 @@
-
+
-
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 4343ab5..960c647 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -19,6 +19,7 @@
+
diff --git a/app/src/main/java/com/example/nemophila/FriendActivity.java b/app/src/main/java/com/example/nemophila/FriendActivity.java
index dbca5a6..44698a9 100644
--- a/app/src/main/java/com/example/nemophila/FriendActivity.java
+++ b/app/src/main/java/com/example/nemophila/FriendActivity.java
@@ -11,8 +11,6 @@
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
-import android.graphics.Color;
-import android.graphics.PorterDuff;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -65,8 +63,7 @@
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- Toast.makeText(FriendActivity.this, friend.getName(), Toast.LENGTH_SHORT).show();
-// friendViewModel.deleteFriend(myUid, friend.getId(), myToken);
+ friendViewModel.deleteFriend(myUid, friend.getId(), myToken);
}
})
.setNegativeButton("キャンセル", null)
@@ -132,7 +129,7 @@
@Override
public FriendsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int ViewType) {
// layoutXMLからViewを生成
- View inflate = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_friends_activity, parent,false);
+ View inflate = LayoutInflater.from(parent.getContext()).inflate(R.layout.friend_list_item, parent,false);
// ViewHolderを生成
FriendsViewHolder vh = new FriendsViewHolder(inflate);
diff --git a/app/src/main/res/layout/activity_friend.xml b/app/src/main/res/layout/activity_friend.xml
index 5ac6e12..8a95aba 100644
--- a/app/src/main/res/layout/activity_friend.xml
+++ b/app/src/main/res/layout/activity_friend.xml
@@ -1,43 +1,57 @@
-
+ tools:context=".FriendActivity"
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="0.87" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/friend_list_item.xml b/app/src/main/res/layout/friend_list_item.xml
new file mode 100644
index 0000000..a0353d9
--- /dev/null
+++ b/app/src/main/res/layout/friend_list_item.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_friends_activity.xml b/app/src/main/res/layout/layout_friends_activity.xml
deleted file mode 100644
index a0353d9..0000000
--- a/app/src/main/res/layout/layout_friends_activity.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file