mirror of
https://github.com/jrpie/Launcher.git
synced 2025-04-19 02:10:54 +02:00
Add dotted bottom progress to swipeable tutorial
Closes #10 Now one can't exit the tutorial, this will be fixed before merging
This commit is contained in:
parent
d0201f02a0
commit
3703c5e344
5 changed files with 49 additions and 4 deletions
12
app/src/main/res/drawable/tutorial_default_dot.xml
Normal file
12
app/src/main/res/drawable/tutorial_default_dot.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape
|
||||
android:innerRadius="0dp"
|
||||
android:shape="ring"
|
||||
android:thickness="5dp"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#777"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
12
app/src/main/res/drawable/tutorial_selected_dot.xml
Normal file
12
app/src/main/res/drawable/tutorial_selected_dot.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape
|
||||
android:innerRadius="0dp"
|
||||
android:shape="ring"
|
||||
android:thickness="5dp"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#ddd"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
8
app/src/main/res/drawable/tutorial_tab_selector.xml
Normal file
8
app/src/main/res/drawable/tutorial_tab_selector.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/tutorial_selected_dot"
|
||||
android:state_selected="true"/>
|
||||
|
||||
<item android:drawable="@drawable/tutorial_default_dot"/>
|
||||
</selector>
|
|
@ -64,4 +64,16 @@
|
|||
android:layout_marginTop="64dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:layout_constraintTop_toBottomOf="@id/tutorial_appbar" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tutorial_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabBackground="@drawable/tutorial_tab_selector"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicatorHeight="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Add a link
Reference in a new issue