ブクマ機能おそらくできてる

This commit is contained in:
nero 2024-01-24 11:28:22 +09:00
parent c1b55ef29a
commit 281d1eeb39
8 changed files with 28 additions and 5 deletions

View File

@ -31,6 +31,7 @@
<option value="$PROJECT_DIR$/source" />
<option value="$PROJECT_DIR$/utils" />
<option value="$PROJECT_DIR$/vcs" />
<option value="$PROJECT_DIR$/viewer2" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />

View File

@ -1,4 +1,4 @@
package one.nem.lacerta.component.viewer;
package one.nem.lacerta.component.viewer.BookMark;
import android.os.Bundle;
import android.view.GestureDetector;
@ -14,6 +14,8 @@ import java.util.UUID;
import javax.inject.Inject;
import one.nem.lacerta.component.viewer.R;
// BookMarkFragment.java
public class BookMarkFragment extends Fragment {

View File

@ -1,4 +1,4 @@
package one.nem.lacerta.component.viewer;
package one.nem.lacerta.component.viewer.BookMark;
import android.os.Bundle;
import android.view.LayoutInflater;
@ -13,6 +13,8 @@ import java.util.List;
import javax.inject.Inject;
import one.nem.lacerta.component.viewer.R;
// BookMarkListFragment.java
public class BookMarkListFragment extends Fragment {
@Inject
@ -31,7 +33,7 @@ public class BookMarkListFragment extends Fragment {
List<Bookmark> bookmarks = bookmarkRepository.getAllBookmarks();
// ブックマーク一覧を表示するRecyclerViewのセットアップ
RecyclerView recyclerView = view.findViewById(R.id.recyclerView);
RecyclerView recyclerView = view.findViewById(R.id.recycler_view);
BookmarkAdapter adapter = new BookmarkAdapter(bookmarks, new OnBookmarkClickListener() {
@Override
public void onBookmarkClick(Bookmark selectedBookmark) {

View File

@ -1,4 +1,4 @@
package one.nem.lacerta.component.viewer;
package one.nem.lacerta.component.viewer.BookMark;
// Bookmark.java
public class Bookmark {

View File

@ -1,4 +1,4 @@
package one.nem.lacerta.component.viewer;
package one.nem.lacerta.component.viewer.BookMark;
// BookmarkRepository.java
import java.util.ArrayList;

View File

@ -0,0 +1,10 @@
package one.nem.lacerta.component.viewer.BookMark;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
// OnBookmarkClickListener.java
public interface OnBookmarkClickListener {
void onBookmarkClick(Bookmark selectedBookmark);
}

View File

@ -11,5 +11,12 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<!-- item_bookmark.xml -->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/titleTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"/>
</FrameLayout>

View File

@ -32,3 +32,4 @@ include ':processor'
include ':shared:ui'
include ':vcs'
include ':feature:setting'
include ':viewer2'