Skip to content

Instantly share code, notes, and snippets.

@ivanarellano
ivanarellano / gist:b2eee986e3fddfe12b6f
Last active August 29, 2015 14:19
Simple EditText hint clearing
/*
A custom color selector can simulate this coded function.
This is used to 'clear' the Hint when the user taps an EditText,
thus allowing a centered text cursor to be unobstructed by the Hint.
*/
// custom edittext
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);

Keybase proof

I hereby claim:

  • I am ivanarellano on github.
  • I am hubbu (https://keybase.io/hubbu) on keybase.
  • I have a public key whose fingerprint is AB3C A216 B1DE 332C E4FE 1712 41C0 EC77 24CE 1384

To claim this, I am signing this object:

@ivanarellano
ivanarellano / .md
Last active March 27, 2023 17:43
ADB Screencap and Screenrecord Commands on Android 4.4+

Screencap Command Usage

  1. adb shell screencap /sdcard/screencap.png
  2. adb pull /sdcard/screencap.png
  3. (Optional) Delete the file: adb rm /sdcard/screencap.png

Screenrecord Command Usage

  1. adb shell screenrecord /sdcard/screenrecord.mp4
  2. Press Ctrl + C on Mac to stop recording
  3. adb pull /sdcard/screenrecord.mp4
  4. (Optional) Delete the file: adb rm /sdcard/screenrecord.mp4