Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a third intro screen to inform users about changing the storage location for downloading ZIM files. #4179

Merged
merged 2 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class IntroRobot : BaseRobot() {
isVisible(TextId(string.save_books_offline))
isVisible(TextId(string.download_books_message))
}
attempt(10) {
isVisible(TextId(string.save_books_in_desired_storage))
isVisible(TextId(string.storage_location_hint))
}
}

infix fun clickGetStarted(func: TopLevelDestinationRobot.() -> Unit): TopLevelDestinationRobot {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class IntroFragment : BaseFragment(), IntroContract.View, FragmentActivityExtens
fragmentIntroBinding?.viewPager?.let { viewPager ->
views = arrayOf(
layoutInflater.inflate(R.layout.item_intro_1, viewPager, false),
layoutInflater.inflate(R.layout.item_intro_2, viewPager, false)
layoutInflater.inflate(R.layout.item_intro_2, viewPager, false),
layoutInflater.inflate(R.layout.item_intro_3, viewPager, false)
)
viewPager.run {
adapter = IntroPagerAdapter(views)
Expand Down
38 changes: 38 additions & 0 deletions app/src/main/res/drawable-night/ic_storage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
~ Kiwix Android
~ Copyright (c) 2025 Kiwix <android.kiwix.org>
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="64"
android:viewportHeight="64">
<path
android:fillColor="#ffffff"
android:pathData="M8,17.662a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM12,17.662a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM16,17.662a1,1 0,0 0,2 0,1 1,0 0,0 -2,0Z" />
<path
android:fillColor="#ffffff"
android:pathData="M7,51.32h27.86a3.003,3.003 0,0 0,3 -3,1.009 1.009,0 1,0 -2,-0.21 1.031,1.031 0,0 1,-1 1.21H7a1.001,1.001 0,0 1,-1 -1v-3.96a1.001,1.001 0,0 1,1 -1h24.11a1,1 0,0 0,0 -2H9.19v-4.38H28a1,1 0,0 0,0 -2H7a1.001,1.001 0,0 1,-1 -1v-3.96a1.001,1.001 0,0 1,1 -1h21a1,1 0,0 0,0 -2H9.19v-4.38h21.92a1,1 0,0 0,0 -2H7a1.001,1.001 0,0 1,-1 -1v-3.96a1.001,1.001 0,0 1,1 -1h27.86a0.99,0.99 0,0 1,1 1,1.009 1.009,0 1,0 2,0.21 3.02,3.02 0,0 0,-3 -3.21H7a3.003,3.003 0,0 0,-3 3v3.96a3.017,3.017 0,0 0,3.19 3v4.38a3.017,3.017 0,0 0,-3.19 3v3.96a3.003,3.003 0,0 0,3 3h0.19v4.38a3.017,3.017 0,0 0,-3.19 3v3.96a3.003,3.003 0,0 0,3 3Z" />
<path
android:fillColor="#ffffff"
android:pathData="M8,46.339a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM12,46.339a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM16,46.339a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM8,32a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM12,32a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM16,32a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM59.099,28.72l-2.298,-0.229a1.284,1.284 0,0 1,-0.827 -2.006l1.459,-1.787a0.999,0.999 0,0 0,-0.068 -1.34l-3.224,-3.223a0.999,0.999 0,0 0,-1.34 -0.068l-1.787,1.46a1.29,1.29 0,0 1,-2.006 -0.831l-0.229,-2.295a1,1 0,0 0,-0.995 -0.901h-4.568a1,1 0,0 0,-0.995 0.9l-0.229,2.299a1.292,1.292 0,0 1,-2.007 0.827L38.2,20.067a0.999,0.999 0,0 0,-1.34 0.068l-3.224,3.224a0.999,0.999 0,0 0,-0.068 1.34l1.46,1.787a1.29,1.29 0,0 1,-0.83 2.006l-2.296,0.228a1,1 0,0 0,-0.901 0.995v4.57a1,1 0,0 0,0.901 0.995l2.298,0.229a1.29,1.29 0,0 1,0.827 2.006l-1.459,1.787a0.999,0.999 0,0 0,0.068 1.34l3.224,3.223a1.001,1.001 0,0 0,1.34 0.068l1.787,-1.46a1.29,1.29 0,0 1,2.006 0.831l0.229,2.295a1,1 0,0 0,0.995 0.901h4.568a1,1 0,0 0,0.995 -0.9l0.229,-2.299a1.291,1.291 0,0 1,2.007 -0.827l1.786,1.459a1.001,1.001 0,0 0,1.34 -0.068l3.224,-3.224a0.999,0.999 0,0 0,0.068 -1.34l-1.46,-1.787a1.29,1.29 0,0 1,0.83 -2.006l2.296,-0.228a1,1 0,0 0,0.901 -0.995v-4.57a1,1 0,0 0,-0.901 -0.995ZM58,33.38l-1.39,0.138a3.282,3.282 0,0 0,-2.185 5.262l0.887,1.086 -1.946,1.946 -1.085,-0.887a3.283,3.283 0,0 0,-5.263 2.181l-0.14,1.394h-2.757l-0.139,-1.391a3.283,3.283 0,0 0,-5.262 -2.184l-1.086,0.887 -1.946,-1.946 0.887,-1.085a3.283,3.283 0,0 0,-2.181 -5.263L33,33.38v-2.758l1.39,-0.139a3.282,3.282 0,0 0,2.185 -5.262l-0.887,-1.086 1.946,-1.946 1.085,0.887a3.283,3.283 0,0 0,5.263 -2.181l0.14,-1.394h2.757l0.139,1.391a3.165,3.165 0,0 0,1.97 2.606,3.197 3.197,0 0,0 3.292,-0.422l1.086,-0.886 1.946,1.945 -0.887,1.085a3.283,3.283 0,0 0,2.181 5.263l1.394,0.139Z"
tools:ignore="VectorPath" />
<path
android:fillColor="#ffffff"
android:pathData="M45.5,25a7.008,7.008 0,0 0,-7 7c0.329,9.264 13.672,9.262 14,0a7.008,7.008 0,0 0,-7 -7ZM45.5,37c-6.608,-0.21 -6.606,-9.79 0,-10 6.608,0.21 6.606,9.79 0,10Z" />
</vector>
38 changes: 38 additions & 0 deletions app/src/main/res/drawable/ic_storage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
~ Kiwix Android
~ Copyright (c) 2025 Kiwix <android.kiwix.org>
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="64"
android:viewportHeight="64">
<path
android:fillColor="#000000"
android:pathData="M8,17.662a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM12,17.662a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM16,17.662a1,1 0,0 0,2 0,1 1,0 0,0 -2,0Z" />
<path
android:fillColor="#000000"
android:pathData="M7,51.32h27.86a3.003,3.003 0,0 0,3 -3,1.009 1.009,0 1,0 -2,-0.21 1.031,1.031 0,0 1,-1 1.21H7a1.001,1.001 0,0 1,-1 -1v-3.96a1.001,1.001 0,0 1,1 -1h24.11a1,1 0,0 0,0 -2H9.19v-4.38H28a1,1 0,0 0,0 -2H7a1.001,1.001 0,0 1,-1 -1v-3.96a1.001,1.001 0,0 1,1 -1h21a1,1 0,0 0,0 -2H9.19v-4.38h21.92a1,1 0,0 0,0 -2H7a1.001,1.001 0,0 1,-1 -1v-3.96a1.001,1.001 0,0 1,1 -1h27.86a0.99,0.99 0,0 1,1 1,1.009 1.009,0 1,0 2,0.21 3.02,3.02 0,0 0,-3 -3.21H7a3.003,3.003 0,0 0,-3 3v3.96a3.017,3.017 0,0 0,3.19 3v4.38a3.017,3.017 0,0 0,-3.19 3v3.96a3.003,3.003 0,0 0,3 3h0.19v4.38a3.017,3.017 0,0 0,-3.19 3v3.96a3.003,3.003 0,0 0,3 3Z" />
<path
android:fillColor="#000000"
android:pathData="M8,46.339a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM12,46.339a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM16,46.339a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM8,32a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM12,32a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM16,32a1,1 0,0 0,2 0,1 1,0 0,0 -2,0ZM59.099,28.72l-2.298,-0.229a1.284,1.284 0,0 1,-0.827 -2.006l1.459,-1.787a0.999,0.999 0,0 0,-0.068 -1.34l-3.224,-3.223a0.999,0.999 0,0 0,-1.34 -0.068l-1.787,1.46a1.29,1.29 0,0 1,-2.006 -0.831l-0.229,-2.295a1,1 0,0 0,-0.995 -0.901h-4.568a1,1 0,0 0,-0.995 0.9l-0.229,2.299a1.292,1.292 0,0 1,-2.007 0.827L38.2,20.067a0.999,0.999 0,0 0,-1.34 0.068l-3.224,3.224a0.999,0.999 0,0 0,-0.068 1.34l1.46,1.787a1.29,1.29 0,0 1,-0.83 2.006l-2.296,0.228a1,1 0,0 0,-0.901 0.995v4.57a1,1 0,0 0,0.901 0.995l2.298,0.229a1.29,1.29 0,0 1,0.827 2.006l-1.459,1.787a0.999,0.999 0,0 0,0.068 1.34l3.224,3.223a1.001,1.001 0,0 0,1.34 0.068l1.787,-1.46a1.29,1.29 0,0 1,2.006 0.831l0.229,2.295a1,1 0,0 0,0.995 0.901h4.568a1,1 0,0 0,0.995 -0.9l0.229,-2.299a1.291,1.291 0,0 1,2.007 -0.827l1.786,1.459a1.001,1.001 0,0 0,1.34 -0.068l3.224,-3.224a0.999,0.999 0,0 0,0.068 -1.34l-1.46,-1.787a1.29,1.29 0,0 1,0.83 -2.006l2.296,-0.228a1,1 0,0 0,0.901 -0.995v-4.57a1,1 0,0 0,-0.901 -0.995ZM58,33.38l-1.39,0.138a3.282,3.282 0,0 0,-2.185 5.262l0.887,1.086 -1.946,1.946 -1.085,-0.887a3.283,3.283 0,0 0,-5.263 2.181l-0.14,1.394h-2.757l-0.139,-1.391a3.283,3.283 0,0 0,-5.262 -2.184l-1.086,0.887 -1.946,-1.946 0.887,-1.085a3.283,3.283 0,0 0,-2.181 -5.263L33,33.38v-2.758l1.39,-0.139a3.282,3.282 0,0 0,2.185 -5.262l-0.887,-1.086 1.946,-1.946 1.085,0.887a3.283,3.283 0,0 0,5.263 -2.181l0.14,-1.394h2.757l0.139,1.391a3.165,3.165 0,0 0,1.97 2.606,3.197 3.197,0 0,0 3.292,-0.422l1.086,-0.886 1.946,1.945 -0.887,1.085a3.283,3.283 0,0 0,2.181 5.263l1.394,0.139Z"
tools:ignore="VectorPath" />
<path
android:fillColor="#000000"
android:pathData="M45.5,25a7.008,7.008 0,0 0,-7 7c0.329,9.264 13.672,9.262 14,0a7.008,7.008 0,0 0,-7 -7ZM45.5,37c-6.608,-0.21 -6.606,-9.79 0,-10 6.608,0.21 6.606,9.79 0,10Z" />
</vector>
71 changes: 71 additions & 0 deletions app/src/main/res/layout/item_intro_3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Kiwix Android
~ Copyright (c) 2025 Kiwix <android.kiwix.org>
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorSurface"
android:padding="24dp">

<ImageView
android:id="@+id/storage_icon"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_storage"
app:layout_constraintBottom_toTopOf="@id/heading"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="160dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_max="160dp"
tools:ignore="ContentDescription" />

<TextView
android:id="@+id/heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="@string/save_books_in_desired_storage"
android:textAlignment="center"
android:textSize="23sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/subheading"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_end="56dp" />

<TextView
android:id="@+id/subheading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_location_hint"
android:textAlignment="center"
android:textColor="?textTertiary"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guideline" />
</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 2 additions & 0 deletions core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@
<string name="welcome_to_the_family" tools:keep="@string/welcome_to_the_family">Welcome to the family</string>
<string name="save_books_offline" tools:keep="@string/save_books_offline">Save books offline</string>
<string name="download_books_message" tools:keep="@string/download_books_message">Download books and read wherever you are.</string>
<string name="save_books_in_desired_storage">Save books in desired storage</string>
<string name="storage_location_hint">You can choose your preferred storage location, either SD card or internal storage, for downloading ZIM files from the Settings screen.</string>
<string name="unable_to_add_to_bookmarks">Unable to add to bookmarks</string>
<string name="go_to_previous_page">Go to previous page</string>
<string name="go_to_next_page">Go to next page</string>
Expand Down
Loading