This article contains all the expertise we are looking for. Knowledge with these travel APIs:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end | |
import androidx.recyclerview.widget.RecyclerView | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.AsyncListDiffer | |
import androidx.recyclerview.widget.DiffUtil | |
#parse("File Header.java") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Align composables with respect to one another | |
@Composable | |
fun CircularIndeterminateProgressBar(isDisplayed: Boolean) { | |
if (isDisplayed) { | |
ConstraintLayout( | |
modifier = Modifier.fillMaxSize() | |
) { | |
val (progress, text) = createRefs() | |
CircularProgressIndicator( | |
modifier = Modifier.constrainAs(progress) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class ProgressBarState{ | |
object Loading: ProgressBarState() | |
object None: ProgressBarState() | |
} | |
sealed class DataState<T> { | |
data class Response<T>( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def private_chat_room_view(request, *args, **kwargs): | |
room_id = request.GET.get("room_id") | |
user = request.user | |
if not user.is_authenticated: | |
base_url = reverse('login') | |
query_string = urlencode({'next': f"/chat/?room_id={room_id}"}) | |
url = f"{base_url}?{query_string}" | |
return redirect(url) | |
context = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct RecipeListScreen: View { | |
@ObservedObject var viewModel: RecipeListViewModel | |
init(){ | |
self.viewModel = RecipeListViewModel() | |
} | |
var body: some View { | |
List { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun RecipeListScreen( | |
state: RecipeListState, | |
onTriggerEvent: (Event) -> Unit, | |
onClickRecipeListItem: (Int) -> Unit, | |
){ | |
AppTheme { | |
RecipeList( | |
loading = state.isLoading, | |
recipes = state.recipes, |
I couldn't get BottomSheetScaffold to work properly when used on top of a GoogleMap (in an AndroidView). So I made my own.
It is not thoroughly tested but seems to be working well enough.
Create a bottom sheet like this: https://imgur.com/gallery/FTWS8Uc
Updates for the Food2ForkCompose app from alpha-11 to beta01.
- kotlin ->
1.4.30
- Make sure Kotlin is updated to early version
- Settings > Languages and Frameworks > Kotlin > Early Access Preview 1.4.x
- kotlin_compiler_extension ->
1.0.0-beta01
- compose ->
1.0.0-beta01
(from alpha11) - navigation-compose ->
1.0.0-alpha08
(from alpha06) - Add
const val compose_constraint = "1.0.0-alpha03"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<ScrollView | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:fillViewport="true" | |
> |