pull/4008/merge
acrodriguezs1 2 weeks ago committed by GitHub
commit 544c274e8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,3 +1,15 @@
# EVIDENCE OF CHANGES IN THE APP REPOSITORY MOVILE APP DEVELOPMENT COURSE
## ISSUE
<img width="1726" height="933" alt="image" src="https://github.com/user-attachments/assets/afd51f5f-b5a4-4020-85db-476d20b71d36" />
## PULL REQUEST
<img width="1715" height="918" alt="image" src="https://github.com/user-attachments/assets/6430abe7-b326-4f83-b16d-5dd7e823e296" />
Astrid was a popular cross-platform productivity service that was [acquired](https://web.archive.org/web/20130811052500/http://blog.astrid.com/blog/2013/05/01/yahoo-acquires-astrid/) and [discontinued](https://techcrunch.com/2013/07/06/astrid-goes-dark-august-5-goodnight-sweet-squid/) in 2013. The source code from Astrid's open source Android app serves as the basis of Tasks. Astrid was a popular cross-platform productivity service that was [acquired](https://web.archive.org/web/20130811052500/http://blog.astrid.com/blog/2013/05/01/yahoo-acquires-astrid/) and [discontinued](https://techcrunch.com/2013/07/06/astrid-goes-dark-august-5-goodnight-sweet-squid/) in 2013. The source code from Astrid's open source Android app serves as the basis of Tasks.
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" [<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"

@ -7,6 +7,7 @@ import androidx.activity.compose.LocalActivity
import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity.RESULT_OK import androidx.appcompat.app.AppCompatActivity.RESULT_OK
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.PaddingValues
@ -20,8 +21,6 @@ import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.windowInsetsBottomHeight
import androidx.compose.foundation.layout.windowInsetsTopHeight
import androidx.compose.material3.DrawerState import androidx.compose.material3.DrawerState
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
@ -44,6 +43,7 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.core.content.IntentCompat.getParcelableExtra import androidx.core.content.IntentCompat.getParcelableExtra
import androidx.fragment.compose.AndroidFragment import androidx.fragment.compose.AndroidFragment
@ -123,7 +123,6 @@ fun HomeScreen(
) { ) {
val context = LocalContext.current val context = LocalContext.current
val scope = rememberCoroutineScope() val scope = rememberCoroutineScope()
Box(modifier = Modifier.fillMaxSize()) {
TaskListDrawer( TaskListDrawer(
arrangement = if (state.menuQuery.isBlank()) Arrangement.Top else Arrangement.Bottom, arrangement = if (state.menuQuery.isBlank()) Arrangement.Top else Arrangement.Bottom,
filters = if (state.menuQuery.isNotEmpty()) state.searchItems else state.drawerItems, filters = if (state.menuQuery.isNotEmpty()) state.searchItems else state.drawerItems,
@ -211,23 +210,12 @@ fun HomeScreen(
) )
}, },
) )
SystemBarScrim(
modifier = Modifier
.windowInsetsTopHeight(WindowInsets.systemBars)
.align(Alignment.TopCenter)
)
SystemBarScrim(
modifier = Modifier
.windowInsetsBottomHeight(WindowInsets.systemBars)
.align(Alignment.BottomCenter),
)
}
} }
} }
) { ) {
Box(modifier = Modifier.fillMaxSize()) {
val scope = rememberCoroutineScope() val scope = rememberCoroutineScope()
ListDetailPaneScaffold( ListDetailPaneScaffold(
directive = navigator.scaffoldDirective, directive = navigator.scaffoldDirective,
value = navigator.scaffoldValue, value = navigator.scaffoldValue,
@ -266,17 +254,25 @@ fun HomeScreen(
}, },
detailPane = { detailPane = {
val direction = LocalLayoutDirection.current val direction = LocalLayoutDirection.current
val imeOpen = rememberImeState().value
val insets = windowInsets.value
val topPad = insets.calculateTopPadding()
val startPad = insets.calculateStartPadding(direction)
val endPad = insets.calculateEndPadding(direction)
val bottomPad = if (imeOpen)
WindowInsets.ime.asPaddingValues().calculateBottomPadding()
else
insets.calculateBottomPadding()
Box( Box(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.padding( .padding(
top = windowInsets.value.calculateTopPadding(), top = topPad,
start = windowInsets.value.calculateStartPadding(direction), start = startPad,
end = windowInsets.value.calculateEndPadding(direction), end = endPad,
bottom = if (rememberImeState().value) bottom = bottomPad
WindowInsets.ime.asPaddingValues().calculateBottomPadding()
else
windowInsets.value.calculateBottomPadding()
), ),
contentAlignment = Alignment.Center, contentAlignment = Alignment.Center,
) { ) {
@ -304,13 +300,6 @@ fun HomeScreen(
} }
}, },
) )
SystemBarScrim(
modifier = Modifier
.windowInsetsTopHeight(WindowInsets.systemBars)
.align(Alignment.TopCenter),
)
}
} }
} }
} }

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical"> android:orientation="vertical">
<include <include

@ -32,7 +32,10 @@
android:layout_toStartOf="@id/widget_button" android:layout_toStartOf="@id/widget_button"
android:src="@drawable/ic_outline_settings_24px" android:src="@drawable/ic_outline_settings_24px"
android:contentDescription="@string/widget_settings" android:contentDescription="@string/widget_settings"
tools:padding="@dimen/widget_padding"/> android:background="@android:color/transparent"
android:padding="@dimen/widget_padding"
/>
<TextView <TextView
android:id="@+id/widget_title" android:id="@+id/widget_title"

@ -30,6 +30,7 @@
</style> </style>
<style name="Tasks" parent="TasksBase"> <style name="Tasks" parent="TasksBase">
<item name="android:windowBackground">@null</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLightStatusBar">@bool/light_status_bar</item> <item name="android:windowLightStatusBar">@bool/light_status_bar</item>
<item name="android:statusBarColor">@color/content_background</item> <item name="android:statusBarColor">@color/content_background</item>

Loading…
Cancel
Save