Source: Self
Question: How to add ripple effect with xml instead of using RippleDrawable?
Answer:
test_layout.xml:
<?xml version="1.0" encoding="utf-8"?>| # project gradle.properties by srayhunter@github | |
| # run the daemon on builds | |
| org.gradle.daemon=true | |
| org.gradle.jvmargs=-Djava.awt.headless=true -Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 |
| apply plugin: 'java' | |
| sourceCompatibility = JavaVersion.VERSION_1_7 | |
| targetCompatibility = JavaVersion.VERSION_1_7 | |
| def logger = new com.android.build.gradle.internal.LoggerWrapper(project.logger) | |
| def sdkHandler = new com.android.build.gradle.internal.SdkHandler(project, logger) | |
| for (File file : sdkHandler.sdkLoader.repositories) { | |
| project.repositories.maven { | |
| url = file.toURI() |
| /** | |
| * Creates a 'ghost' bitmap version of the given source drawable (ideally a BitmapDrawable). | |
| * In the ghost bitmap, the RGB values take on the values from the 'color' argument, while | |
| * the alpha values are derived from the source's grayscaled RGB values. The effect is that | |
| * you can see through darker parts of the source bitmap, while lighter parts show up as | |
| * the given color. The 'invert' argument inverts the computation of alpha values, and looks | |
| * best when the given color is a dark. | |
| */ | |
| private Bitmap createGhostIcon(Drawable src, int color, boolean invert) { | |
| int width = src.getIntrinsicWidth(); |
| #!/bin/sh | |
| cd /home/ec2-user | |
| wget http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip | |
| unzip CloudWatchMonitoringScripts-v1.1.0.zip | |
| rm CloudWatchMonitoringScripts-v1.1.0.zip | |
| chown ec2-user:ec2-user aws-scripts-mon | |
| echo "*/5 * * * * ec2-user /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --from-cron" >> /etc/crontab |
Source: Self
Question: How to add ripple effect with xml instead of using RippleDrawable?
Answer:
test_layout.xml:
<?xml version="1.0" encoding="utf-8"?>| ... | |
| import androidx.fragment.app.DialogFragment | |
| ... | |
| class MyDialogFragmentDialog : DialogFragment() { | |
| ... | |
| private val statusBarColorRes = R.color.colorPrimaryDark | |
| private var previousSystemUiVisibility: Int? = null | |
| ... | |
| override fun getTheme(): Int = R.style.FullscreenDialog | |
| ... |
xhost + ${hostname} to allow connections to the macOS host *export HOSTNAME=`hostname`* environment:
| git clean -xfd | |
| git submodule foreach --recursive git clean -xfd | |
| git reset --hard | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:
echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes
I suggest you edit your /etc/rc.local file to make this change persistant across reboots.
sudo nano /etc/rc.local
| Code | Title | Duration | Link |
|---|---|---|---|
| Keynote | Andy Jassy Keynote Announcement Recap | 0:01 | https://www.youtube.com/watch?v=TZCxKAM2GtQ |
| Keynote | AWS re:Invent 2016 Keynote: Andy Jassy | 2:22 | https://www.youtube.com/watch?v=8RrbUyw9uSg |
| Keynote | AWS re:Invent 2016 Keynote: Werner Vogels | 2:16 | https://www.youtube.com/watch?v=ZDScBNahsL4 |
| Keynote | [Tuesday Night Live with Jame |