Cheatsheet for adb commands, forked from Pulimet/AdbCommands
ANDROID_TOOLS_ZIP=commandlinetools-linux-7583922_latest.zip
| @Composable | |
| fun EmojiFont() = FontFamily( | |
| Font(Res.font.noto_emoji_light, FontWeight.Light), | |
| Font(Res.font.noto_emoji_reg, FontWeight.Normal), | |
| Font(Res.font.noto_emoji_med, FontWeight.Medium), | |
| ) | |
| val testEmojis = | |
| persistentListOf("🍇", "🍅", "🥬", "🍞", "🧀", "🥚", "🥩", "🍫", "🍕", "🍷", "🧃", "🧼", "🧻", "🧴", "🍏") |
Cheatsheet for adb commands, forked from Pulimet/AdbCommands
ANDROID_TOOLS_ZIP=commandlinetools-linux-7583922_latest.zip
| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2022 Albert Chang | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| fun Modifier.swipeableTopBottom(onTop: () -> Unit, onBottom: () -> Unit): Modifier = composed { | |
| var width by rememberSaveable { mutableStateOf(0f) } | |
| val swipeableState = rememberSwipeableState( | |
| SwipeDirection.Initial, | |
| animationSpec = snap() | |
| ) | |
| val anchorWidth = remember(width) { | |
| if (width == 0f) { | |
| 1f | |
| } else { |
| package com.mobile.devpackage.bll.adapters | |
| import android.content.Context | |
| import android.view.LayoutInflater | |
| import android.view.View.* | |
| import android.view.ViewGroup | |
| import androidx.recyclerview.widget.RecyclerView | |
| import com.mobile.devname.R | |
| import com.mobile.devname.databinding.GenericTransactionRowFooterLayoutBinding | |
| import com.mobile.devname.databinding.GenericTransactionRowHeaderLayoutBinding |
| #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") |
| /** | |
| * Let's say we want to display a list of Animals in a RecyclerView. | |
| * The list can contain items of type Dog, Cat and Snake. | |
| */ | |
| // AdapterDelegate for Dog. | |
| fun dogAdapterDelegate(picasso : Picasso) = adapterDelegate<Dog, Animal>(R.layout.item_dog){ // Generics Types means this AdapterDelegate is used if item is instanceof Dog (whole list is List<Anmial>) | |
| // this block is run once in onCreateViewHolder. Think of it as an intializer for a ViewHolder. | |
| val name = findViewById(R.id.name) | |
| val image = findViewById(R.id.image) |
| /* Copyright 2019 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * https://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| android { | |
| signingConfigs { | |
| getByName("debug") { | |
| keyAlias = "debug" | |
| keyPassword = "my debug key password" | |
| storeFile = file("/home/miles/keystore.jks") | |
| storePassword = "my keystore password" | |
| } | |
| create("release") { | |
| keyAlias = "release" |