SettingMainFragmentリファクタリング #121

Merged
Fujimatsu merged 8 commits from improve/refactor2 into main 2024-07-02 14:20:52 +00:00
Showing only changes of commit a51301ca6c - Show all commits

View File

@ -3,7 +3,6 @@ package one.nem.kidshift.feature.setting;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -16,7 +15,6 @@ import android.widget.TextView;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@ -48,7 +46,7 @@ public class SettingMainFragment extends Fragment {
TextView username; TextView username;
TextView useradress; TextView userMailAddress;
SettingAdapter mainAdapter; SettingAdapter mainAdapter;
SwipeRefreshLayout swipeRefreshLayout; SwipeRefreshLayout swipeRefreshLayout;
@ -85,7 +83,7 @@ public class SettingMainFragment extends Fragment {
} }
}).thenAccept(parentModel -> { }).thenAccept(parentModel -> {
username.setText(parentModel.getName() != null ? parentModel.getName() : "親の名前"); username.setText(parentModel.getName() != null ? parentModel.getName() : "親の名前");
useradress.setText(parentModel.getEmail() != null ? parentModel.getEmail() : "親のアドレス"); userMailAddress.setText(parentModel.getEmail() != null ? parentModel.getEmail() : "親のアドレス");
}); });
} }
@ -151,7 +149,7 @@ public class SettingMainFragment extends Fragment {
View view = inflater.inflate(R.layout.fragment_setting_main, container, false); View view = inflater.inflate(R.layout.fragment_setting_main, container, false);
username = view.findViewById(R.id.username); username = view.findViewById(R.id.username);
useradress = view.findViewById(R.id.useradress); userMailAddress = view.findViewById(R.id.useradress);
RecyclerView recyclerView = view.findViewById(R.id.childrecyclerview); RecyclerView recyclerView = view.findViewById(R.id.childrecyclerview);