Status Update
Comments
se...@google.com <se...@google.com>
pr...@gmail.com <pr...@gmail.com> #2
pr...@chinesedragoncafe.com <pr...@chinesedragoncafe.com> #3
I suspect issue is somehow related to fact that without that delay()
we're not recomposing with refreshing
set to true
....and end up showing CircularArrowIndicator
in PullRefreshIndicator
when we recompose with it set to false
se...@google.com <se...@google.com> #4
Louis, could you take a look at this? :) I had a quick look around but didn't find the cause.
th...@gmail.com <th...@gmail.com> #5
ch...@gmail.com <ch...@gmail.com> #6
ch...@gmail.com <ch...@gmail.com> #7
PullRefresh
does not clip, so the indicator is drawn outside the bounds. You can change this in your project by doing:
Box(Modifier.clipToBounds().pullRefresh(state)) {
But maybe we should investigate better documentation for this / considering default behaviour
st...@ryanrestaurantcorp.com <st...@ryanrestaurantcorp.com> #8
Branch: androidx-main
commit b60f5bbe2a643390b95e1130e6a55048e22364cd
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Thu Nov 17 18:07:08 2022
Adds clipping to Modifier.pullRefreshIndicatorTransform
This ensures that when the indicator is offset outside of its bounds (i.e it has not been dragged down yet / is not refreshing), it is not visible. This fixes cases where there is no app bar to draw over the offset indicator / the indicator background color is different from the background it is drawn over.
Bug:
Test: PullRefreshIndicatorTransformTest
Change-Id: Ic15dd35a5b3fd851bae3bc8cc6eda826e2005394
A compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/pullrefresh/PullRefreshIndicatorTransformTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/pullrefresh/PullRefreshIndicatorTransform.kt
st...@ryanrestaurantcorp.com <st...@ryanrestaurantcorp.com> #9
Branch: androidx-main
commit 4e301885e5b470a41320fd3900764a2ba5738d53
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Nov 21 19:03:53 2022
Fixes PullRefreshState not resetting indicator position back to 0
If onRefresh never ended up changing refreshing, or refreshing changed to true and false within the same frame so the state write was batched, the indicator would get stuck at its last position as we never animated it back to zero. Instead we now always animate the position back to zero, and any future change to setRefreshing will interrupt this animation and set it to the new correct position.
Fixes:
Test: PullRefreshStateTest
Relnote: "Fixed an issue where PullRefreshIndicator could get stuck after onRefresh is called, if the refreshing state was not changed to true."
Change-Id: Ie24160bf51bd010d165d75675cfb2c51f28dde04
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/pullrefresh/PullRefreshStateTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/pullrefresh/PullRefreshState.kt
kh...@grutto.com <kh...@grutto.com> #10
Hi, in what version can I see this fix ?
st...@ryanrestaurantcorp.com <st...@ryanrestaurantcorp.com> #11
It hasn't released yet, but it should be in 1.4.0-alpha03 when it released
au...@gmail.com <au...@gmail.com> #12
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.4.0-alpha03
au...@gmail.com <au...@gmail.com> #13
The Box(Modifier.clipToBounds().pullRefresh(state)) {
did not fix the issue. A LaunchedEffect
delegated refreshing state fixes the issue:
@Composable
@OptIn(ExperimentalMaterialApi::class)
fun PullRefreshBox(
modifier: Modifier = Modifier,
refreshing: Boolean,
onRefresh: () -> Unit = {},
content: @Composable () -> Unit,
) {
// The LaunchedEffect is needed to fix the hiding of the indicator: https://issuetracker.google.com/issues/248274004
// Without this workaround the indicator would be visible even if the loading finished
var isRefreshingWorkaround by remember { mutableStateOf(refreshing) }
LaunchedEffect(key1 = refreshing) {
isRefreshingWorkaround = refreshing
}
val state = rememberPullRefreshState(isRefreshingWorkaround, onRefresh)
Box(
modifier = modifier.pullRefresh(state),
) {
content()
PullRefreshIndicator(
modifier = Modifier.align(Alignment.TopCenter),
refreshing = isRefreshingWorkaround,
state = state,
contentColor = MaterialTheme.colorScheme.primary,
)
}
}
Description
function myFunction() { var server = '159.89.0.106'; var port = 3306; var dbName = 'testgoogle'; var username = "sentiment"; var password = "sentiment"; // var url = 'jdbc:mysql://'+server+':'+port+'/'+dbName; var url = "jdbc:mysql://159.89.0.106/testgoogle/" console.log(url) var conn = Jdbc.getConnection('jdbc:mysql://159.89.0.106:3306/sentiment','sentiment', 'sentiment'); // var stmt = conn.createStatement(); // stmt.close(); // conn.close(); }
Error:Exception: Failed to establish a database connection. Check connection string, username and password.
Why is this? Exactly followed the guide.