Skip to content

Instantly share code, notes, and snippets.

View dalwadi2's full-sized avatar

Harsh Dalwadi dalwadi2

View GitHub Profile
@dalwadi2
dalwadi2 / 1 search_bar.xml
Created March 10, 2017 13:36 — forked from nickbutcher/1 search_bar.xml
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 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
http://www.apache.org/licenses/LICENSE-2.0
@dalwadi2
dalwadi2 / ClearTextView.java
Created January 31, 2017 09:29 — forked from togramago/ClearTextView.java
TextView with background and transparent (carved through background) text
package com.runup.myapplication2.app;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.drawable.BitmapDrawable;
@dalwadi2
dalwadi2 / gist:ef7ef1e6d67e9777437aca1904846b6e
Created January 18, 2017 10:24 — forked from pocmo/gist:bc95238e890a185003c4
Android M-Preview 1 - Permissions + Groups + Protection Level
(android.permission-group.CONTACTS) android.permission.READ_CONTACTS dangerous
(android.permission-group.CONTACTS) android.permission.WRITE_CONTACTS dangerous
(android.permission-group.CONTACTS) android.permission.READ_PROFILE dangerous
(android.permission-group.CONTACTS) android.permission.WRITE_PROFILE dangerous
(android.permission-group.CALENDAR) android.permission.READ_CALENDAR dangerous
(android.permission-group.CALENDAR) android.permission.WRITE_CALENDAR dangerous
(android.permission-group.SMS) android.permission.SEND_SMS dangerous
(android.permission-group.SMS) android.permission.RECEIVE_SMS dangerous
(android.permission-group.SMS) android.permission.READ_SMS dangerous
(android.permission-group.SMS) android.permission.RECEIVE_WAP_PUSH dangerous