This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| public class TextViewDrawableSize extends TextView { | |
| private static final int DEFAULT_COMPOUND_DRAWABLE_SIZE = -1; | |
| private int compoundDrawableWidth; | |
| private int compoundDrawableHeight; | |
| public TextViewDrawableSize(Context context) { | |
| this(context, null); | |
| } | |
| public TextViewDrawableSize(Context context, AttributeSet attrs) { |
| import android.content.Context | |
| import android.content.res.Resources | |
| import android.graphics.drawable.Drawable | |
| import android.support.annotation.AnyRes | |
| import android.support.v4.app.Fragment | |
| import android.support.v4.content.res.ResourcesCompat.* | |
| import android.view.View | |
| val Context.animations | |
| get() = ResourceMapper { resources.getAnimation(it) } |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.
In your layout you can use:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image_view"
app:srcCompat="@drawable/..." />
Then in your code apply the ShapeAppearanceModel to define your custom corners:
The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.
In your layout you can use:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image_view"
app:srcCompat="@drawable/..." />
Then in your code apply the ShapeAppearanceModel to define your custom corners:
| git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authordate refs/remotes |
One of my colleagues shared an article on writing (good) Git commit messages today: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
| package com.example.android; | |
| import android.content.Context; | |
| import android.widget.ImageView; | |
| import android.util.AttributeSet; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.view.animation.AnimationUtils; | |
| import android.view.animation.Animation; |
| import StringUtils.encodeHex | |
| import java.io.File | |
| import java.io.FileInputStream | |
| import java.io.InputStream | |
| import java.security.MessageDigest | |
| object HashUtils { | |
| const val STREAM_BUFFER_LENGTH = 1024 |