From db26e639e6fad19145a8ae7d0ef655716c0bcfaf Mon Sep 17 00:00:00 2001 From: r-ca Date: Sat, 20 Jan 2024 15:27:39 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E7=94=A8=E3=81=AB?= =?UTF-8?q?=E3=82=A2=E3=82=A4=E3=83=86=E3=83=A0=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/setting/SettingTopFragment.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTopFragment.java b/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTopFragment.java index a8b04d92..80d79e02 100644 --- a/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTopFragment.java +++ b/feature/setting/src/main/java/one/nem/lacerta/setting/SettingTopFragment.java @@ -2,12 +2,19 @@ package one.nem.lacerta.setting; import android.os.Bundle; +import androidx.core.content.ContextCompat; import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import java.util.ArrayList; + +import one.nem.lacerta.setting.model.SettingListItem; + /** * A simple {@link Fragment} subclass. * Use the {@link SettingTopFragment#newInstance} factory method to @@ -35,6 +42,24 @@ public class SettingTopFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment - return inflater.inflate(R.layout.fragment_setting_top, container, false); + View view = inflater.inflate(R.layout.fragment_setting_top, container, false); + + // Setting items + ArrayList settingListItems = new ArrayList<>(); + settingListItems.add( + new SettingListItem( + "About", + "About this app", + ContextCompat.getDrawable(getContext(), one.nem.lacerta.shared.ui.R.drawable.save_24px), + R.id.action_settingTopFragment_to_settingAboutPageFragment + ) + ); + + // Init RecyclerView + RecyclerView recyclerView = view.findViewById(R.id.setting_item_recycler_view); + recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); + recyclerView.setAdapter(new ListItemAdapter(settingListItems)); + + return view; } } \ No newline at end of file