This commit is contained in:
ろむねこ 2024-07-23 13:15:52 +09:00
parent fbfb02ad09
commit 2d9c1a10c9
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -84,29 +84,35 @@ public class WalletParentWrapperFragment extends Fragment {
private void setupViewPager() { private void setupViewPager() {
// デバッグ用 // デバッグ用
childData.getChildList(new ChildModelCallback() { // childData.getChildList(new ChildModelCallback() {
@Override // @Override
public void onUnchanged() { // public void onUnchanged() {
// TODO: impl // // TODO: impl
} // }
//
// @Override
// public void onUpdated(List<ChildModel> childModelList) {
// // TODO: impl
// }
//
// @Override
// public void onFailed(String message) {
// // TODO: impl
// }
// }).thenAccept(childModels -> {
@Override childData.getChildListDirect().thenAccept(childModels -> {
public void onUpdated(List<ChildModel> childModelList) {
// TODO: impl
}
@Override
public void onFailed(String message) {
// TODO: impl
}
}).thenAccept(childModels -> {
tabAdapter.setChildList(childModels); tabAdapter.setChildList(childModels);
requireActivity().runOnUiThread(() -> {
new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> { tabAdapter.notifyDataSetChanged();
tab.setText(childModels.get(position).getName());
}).attach();
requireActivity().runOnUiThread(() -> tabAdapter.notifyDataSetChanged()); new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> {
tab.setText(childModels.get(position).getName());
}).attach();
});
}); });
} }