mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
いろいろ
This commit is contained in:
parent
209eab0755
commit
704c128801
|
@ -93,19 +93,17 @@ public class HomeTopFragment extends Fragment {
|
|||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_home_top, container, false);
|
||||
|
||||
// List<DocumentMeta> metas = document.getAllDocumentMetas(100);
|
||||
ArrayList<ListItem> recentDocument = lacertaLibrary.getRecentDocument(10);
|
||||
|
||||
// ArrayList<ListItem> listItems = lacertaLibrary.getRecentDocument(100);
|
||||
//
|
||||
// Log.d("docs", Integer.toString(listItems.size()));
|
||||
//
|
||||
// RecyclerView recyclerView = view.findViewById(R.id.item_recycler_view);
|
||||
//
|
||||
// recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
//
|
||||
// MyAdapter myAdapter = new MyAdapter(listItems);
|
||||
//
|
||||
// recyclerView.setAdapter(myAdapter);
|
||||
Log.d("docs", Integer.toString(recentDocument.size()));
|
||||
|
||||
RecyclerView recyclerView = view.findViewById(R.id.home_item_recycler_view);
|
||||
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
ListItemAdapter listItemAdapter = new ListItemAdapter(recentDocument);
|
||||
|
||||
recyclerView.setAdapter(listItemAdapter);
|
||||
|
||||
return view;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="128dp"
|
||||
android:layout_height="160dp"
|
||||
android:fitsSystemWindows="true"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:collapsedTitleGravity="start|center_vertical"
|
||||
|
@ -35,29 +35,11 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/home_item_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="テストテストテストテストテストテストテストテストテストテスト"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user