mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 07:53:15 +00:00
ブクマ機能おそらくできてる
This commit is contained in:
parent
c1b55ef29a
commit
281d1eeb39
|
@ -31,6 +31,7 @@
|
||||||
<option value="$PROJECT_DIR$/source" />
|
<option value="$PROJECT_DIR$/source" />
|
||||||
<option value="$PROJECT_DIR$/utils" />
|
<option value="$PROJECT_DIR$/utils" />
|
||||||
<option value="$PROJECT_DIR$/vcs" />
|
<option value="$PROJECT_DIR$/vcs" />
|
||||||
|
<option value="$PROJECT_DIR$/viewer2" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveExternalAnnotations" value="false" />
|
<option name="resolveExternalAnnotations" value="false" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package one.nem.lacerta.component.viewer;
|
package one.nem.lacerta.component.viewer.BookMark;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
|
@ -14,6 +14,8 @@ import java.util.UUID;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import one.nem.lacerta.component.viewer.R;
|
||||||
|
|
||||||
// BookMarkFragment.java
|
// BookMarkFragment.java
|
||||||
public class BookMarkFragment extends Fragment {
|
public class BookMarkFragment extends Fragment {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package one.nem.lacerta.component.viewer;
|
package one.nem.lacerta.component.viewer.BookMark;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -13,6 +13,8 @@ import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import one.nem.lacerta.component.viewer.R;
|
||||||
|
|
||||||
// BookMarkListFragment.java
|
// BookMarkListFragment.java
|
||||||
public class BookMarkListFragment extends Fragment {
|
public class BookMarkListFragment extends Fragment {
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -31,7 +33,7 @@ public class BookMarkListFragment extends Fragment {
|
||||||
List<Bookmark> bookmarks = bookmarkRepository.getAllBookmarks();
|
List<Bookmark> bookmarks = bookmarkRepository.getAllBookmarks();
|
||||||
|
|
||||||
// ブックマーク一覧を表示するRecyclerViewのセットアップ
|
// ブックマーク一覧を表示するRecyclerViewのセットアップ
|
||||||
RecyclerView recyclerView = view.findViewById(R.id.recyclerView);
|
RecyclerView recyclerView = view.findViewById(R.id.recycler_view);
|
||||||
BookmarkAdapter adapter = new BookmarkAdapter(bookmarks, new OnBookmarkClickListener() {
|
BookmarkAdapter adapter = new BookmarkAdapter(bookmarks, new OnBookmarkClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBookmarkClick(Bookmark selectedBookmark) {
|
public void onBookmarkClick(Bookmark selectedBookmark) {
|
|
@ -1,4 +1,4 @@
|
||||||
package one.nem.lacerta.component.viewer;
|
package one.nem.lacerta.component.viewer.BookMark;
|
||||||
|
|
||||||
// Bookmark.java
|
// Bookmark.java
|
||||||
public class Bookmark {
|
public class Bookmark {
|
|
@ -1,4 +1,4 @@
|
||||||
package one.nem.lacerta.component.viewer;
|
package one.nem.lacerta.component.viewer.BookMark;
|
||||||
|
|
||||||
// BookmarkRepository.java
|
// BookmarkRepository.java
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
|
@ -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);
|
||||||
|
}
|
|
@ -11,5 +11,12 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
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>
|
</FrameLayout>
|
|
@ -32,3 +32,4 @@ include ':processor'
|
||||||
include ':shared:ui'
|
include ':shared:ui'
|
||||||
include ':vcs'
|
include ':vcs'
|
||||||
include ':feature:setting'
|
include ':feature:setting'
|
||||||
|
include ':viewer2'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user