mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
Add viewpager and tabs to layout
This commit is contained in:
parent
2955c89536
commit
d71eacb7ef
2 changed files with 20 additions and 4 deletions
|
@ -54,12 +54,12 @@ class ChooseActivity : AppCompatActivity() {
|
|||
viewManager = LinearLayoutManager(this)
|
||||
viewAdapter = AppsRecyclerAdapter( this, action, forApp)
|
||||
|
||||
activity_choose_apps_recycler_view.apply {
|
||||
/*activity_choose_apps_recycler_view.apply {
|
||||
// improve performance (since content changes don't change the layout size)
|
||||
setHasFixedSize(true)
|
||||
layoutManager = viewManager
|
||||
adapter = viewAdapter
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
@ -56,9 +56,25 @@
|
|||
custom:type="solid" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/activity_choose_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
custom:tabTextColor="?attr/android:textColor" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/activity_choose_view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/activity_choose_app_bar"
|
||||
custom:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<!--androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/activity_choose_apps_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
@ -70,6 +86,6 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/activity_choose_app_bar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/activity_choose_app_bar" /-->
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Reference in a new issue