Skip to content

Commit

Permalink
Merge branch 'dev' into 'main'
Browse files Browse the repository at this point in the history
Changes:
- Changed the floating action button layout to align with the M3 guidelines
- Update library versions
- Prepare app for F-Droid release
  • Loading branch information
nsh07 committed Oct 21, 2024
2 parents f23fd87 + 5c92d70 commit 9a54b5f
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 42 deletions.
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,37 @@

</div>

A simple Android app for reading Wikipedia articles distraction-free
---

<div align="center">

A lightweight Android app for reading Wikipedia articles distraction-free

Supports light mode, dark mode and Material You dynamic colors

</div>

---

## Features

- **Fast loading:** The article text is loaded before anything else, so you can get to reading,
quick.
- **Article image:** View an image of the topic from its Wikipedia page. Click on it to enlarge it
and view in full-screen
- **One-handed use:** Use the floating action buttons at the bottom for a complete one-handed
experience
- **Lightweight:** The app starts instantly, and works smoothly
- **Material Design 3:** Designed according to the latest Material Design 3 guidelines
- **Smooth animations:** Smooth and fluent animations

<p align="center" width="100%">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width="30%">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width="30%">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" width="30%">
</p>
<p align="center" width="100%">
<img src="screenshots/main.png" width="24%">
<img src="screenshots/fab.png" width="24%">
<img src="screenshots/dynamic-light.png" width="24%">
<img src="screenshots/dynamic.png" width="24%">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" width="30%">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.png" width="30%">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.png" width="30%">
</p>
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId = "org.nsh07.wikireader"
minSdk = 26
targetSdk = 35
versionCode = 5
versionName = "1.3.0"
versionCode = 6
versionName = "1.3.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
6 changes: 0 additions & 6 deletions app/src/main/java/org/nsh07/wikireader/AppScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ fun AppScreen(
val coroutineScope = rememberCoroutineScope()

val index by remember { derivedStateOf { listState.firstVisibleItemIndex } }
val extendedFab by remember {
derivedStateOf {
listState.lastScrolledBackward || !listState.canScrollForward
}
}

val fabEnter = scaleIn(transformOrigin = TransformOrigin(1f, 1f)) + fadeIn()
val fabExit = scaleOut(transformOrigin = TransformOrigin(1f, 1f)) + fadeOut()
Expand Down Expand Up @@ -86,7 +81,6 @@ fun AppScreen(
focusSearch = { viewModel.focusSearchBar() },
scrollToTop = { coroutineScope.launch { listState.animateScrollToItem(0) } },
index = index,
extendedFab = extendedFab,
fabEnter = fabEnter,
fabExit = fabExit
)
Expand Down
36 changes: 11 additions & 25 deletions app/src/main/java/org/nsh07/wikireader/ui/AppFab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.KeyboardArrowUp
import androidx.compose.material.icons.outlined.Search
import androidx.compose.material3.ExtendedFloatingActionButton
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.SmallFloatingActionButton
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -24,10 +23,8 @@ fun AppFab(
focusSearch: () -> Unit,
scrollToTop: () -> Unit,
index: Int,
extendedFab: Boolean,
fabEnter: EnterTransition,
fabExit: ExitTransition

) {
Column(horizontalAlignment = Alignment.End) {
AnimatedVisibility(
Expand All @@ -36,34 +33,23 @@ fun AppFab(
exit = fabExit
) {
SmallFloatingActionButton(
onClick = focusSearch
onClick = scrollToTop
) {
Icon(
Icons.Outlined.Search,
contentDescription = stringResource(R.string.search)
Icons.Outlined.KeyboardArrowUp,
contentDescription = stringResource(R.string.scroll_to_top)
)
}
}

AnimatedVisibility(
index > 1,
enter = fabEnter,
exit = fabExit,
modifier = Modifier
.padding(top = 24.dp)
FloatingActionButton(
onClick = focusSearch,
modifier = Modifier.padding(top = 24.dp)
) {
ExtendedFloatingActionButton(
onClick = scrollToTop,
icon = {
Icon(
Icons.Outlined.KeyboardArrowUp,
contentDescription = stringResource(R.string.up_arrow)
)
},
text = { Text("Scroll to top") },
expanded = extendedFab,
modifier = Modifier
Icon(
Icons.Outlined.Search,
contentDescription = stringResource(R.string.search)
)
}
}
}
}
21 changes: 21 additions & 0 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<p>A lightweight Android app for reading Wikipedia articles distraction-free. Supports light mode,
dark mode and Material You dynamic colors</p>

<p>Features</p>

<ul>
<li><b>Fast loading:</b> The article text is loaded before anything else, so you can get to
reading, quick
</li>
<li><b>Article image:</b> View an image of the topic from its Wikipedia page. Click on it to
enlarge it
and view in full-screen
</li>
<li><b>One-handed use:</b> Use the floating action buttons at the bottom for a complete
one-handed
experience
</li>
<li><b>Lightweight:</b> The app starts instantly, and works smoothly</li>
<li><b>Material Design 3:</b> Designed according to the latest Material Design 3 guidelines</li>
<li><b>Smooth animations:</b> Smooth and fluent animations</li>
</ul>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fastlane/metadata/android/en-US/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Read Wikipedia pages distraction-free
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WikiReader
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[versions]
agp = "8.7.1"
coilSvg = "2.7.0"
kotlin = "2.0.0"
coreKtx = "1.13.1"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
lifecycleRuntimeKtx = "2.8.6"
activityCompose = "1.9.2"
composeBom = "2024.09.03"
activityCompose = "1.9.3"
composeBom = "2024.10.00"
lifecycleViewmodelCompose = "2.8.6"

coilComposeVersion = "2.6.0"
coilSvg = "2.7.0"
kotlinxSerialization = "1.7.1"
navigationCompose = "2.8.2"
navigationCompose = "2.8.3"
okhttp = "4.12.0"
retrofit = "2.11.0"
retrofit2KotlinxSerializationConverter = "1.0.0"
Expand Down
Binary file removed screenshots/dynamic-light.png
Binary file not shown.
Binary file removed screenshots/dynamic.png
Binary file not shown.
Binary file removed screenshots/fab.png
Binary file not shown.
Binary file removed screenshots/main.png
Binary file not shown.

0 comments on commit 9a54b5f

Please sign in to comment.