ViewCompositionStrategy |
Description |
---|---|
DisposeOnDetachedFromWindow |
The Composition will be disposed when the underlying ComposeView is detached from the window. Has since been superseded by DisposeOnDetachedFromWindowOrReleasedFromPool .Interop scenario: * ComposeView whether it’s the sole element in the View hierarchy, or in the context of a mixed View/Compose screen (not in Fragment). |
DisposeOnDetachedFromWindowOrReleasedFromPool (Default) |
Similar to DisposeOnDetachedFromWindow , when the Composition is not in a pooling container, such as a RecyclerView . If it is in a pooling container, it will dispose when either the pooling container itself detaches from the window |
import android.content.Intent | |
import android.graphics.PixelFormat | |
import android.os.IBinder | |
import android.view.Gravity | |
import android.view.WindowManager | |
import androidx.compose.foundation.gestures.detectDragGestures | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.BoxScope | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.getValue |
import android.os.Bundle | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.LifecycleRegistry | |
import androidx.savedstate.SavedStateRegistry | |
import androidx.savedstate.SavedStateRegistryController | |
import androidx.savedstate.SavedStateRegistryOwner | |
internal class MyLifecycleOwner : SavedStateRegistryOwner { | |
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this) | |
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this) |
#!/bin/bash | |
export __NV_PRIME_RENDER_OFFLOAD=1 | |
export __GLX_VENDOR_LIBRARY_NAME=nvidia | |
export __VK_LAYER_NV_optimus=NVIDIA_only | |
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json | |
exec "$@" |
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
//Colors | |
Color crossColor = const Color(0xFF1ABDD5); | |
Color circleColor = const Color(0xFFD8B9FA); | |
Color accentColor = const Color(0xFF90A4AE); | |
void main() => runApp(MyApp()); |
The android emulator doesn't support all usb devices because they are disabled in the kernel. So we need to build it with another configuration. My goal was to build the same version as it was before, but with just configuration modifications.
Start the emulator without modifications, go into
Configuration > System > About emulated device > Android version
You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:
- Start the
ssh-agent
from Windows Services:
- Type
Services
in theStart Menu
orWin+R
and then typeservices.msc
to launch the Services window; - Find the
OpenSSH Authentication Agent
in the list and double click on it; - In the
OpenSSH Authentication Agent Properties
window that appears, chooseAutomatic
from theStartup type:
dropdown and clickStart
fromService status:
. Make sure it now saysService status: Running
.
- Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
#!/bin/bash | |
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do | |
n=${d#*/iommu_groups/*}; n=${n%%/*} | |
printf 'IOMMU Group %s ' "$n" | |
lspci -nns "${d##*/}" | |
done; |
This will require only one dependency, and one line added to your package.json
and it's super fast.
- Create an app wih create-react-app.
- Install
node-sass
. - Create your base sass file inside
src/sass
. - Add a new script to package json that will watch the file, process sass and compile it into
src/css
. - Include the compiled css into React via
require
, this way your app will reload whenever the new css is compiled. - ran the new script along with
npm start
.
Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell
and then run-as com.mypackage
( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs
),
but on a production release app downloaded from an app store you're most likely to see:
run-as: Package 'com.mypackage' is not debuggable