アクション実装 WIP

This commit is contained in:
r-ca 2024-01-29 05:20:49 +09:00
parent 83cadceefa
commit bdf6bae5fa
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -11,6 +11,8 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import javax.inject.Inject; import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint; import dagger.hilt.android.AndroidEntryPoint;
@ -101,7 +103,18 @@ public class ViewerBodyFragment extends Fragment {
@Override @Override
public void onItemLongClick(String fileName, int position) { public void onItemLongClick(String fileName, int position) {
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity());
builder.setTitle("ページを更新しますか?");
builder.setPositiveButton("更新", (dialog, which) -> {
// update
});
builder.setNegativeButton("キャンセル", (dialog, which) -> {
// cancel
dialog.dismiss();
});
builder.show();
} }
}); });
recyclerView.setAdapter(viewerBodyAdapter); recyclerView.setAdapter(viewerBodyAdapter);