This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added in Android Jelly Bean (4.1) - API 16 : | |
Regular (default): | |
<item name="android:fontFamily">sans-serif</item> | |
<item name="android:textStyle">normal</item> | |
Italic: | |
<item name="android:fontFamily">sans-serif</item> | |
<item name="android:textStyle">italic</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//build.gradle do root do projeto | |
buildscript { | |
repositories { | |
jcenter() | |
maven { url 'https://maven.fabric.io/public' } | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:1.5.0' | |
classpath 'io.fabric.tools:gradle:1.+' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TextView | |
android:layout_width=”wrap_content” | |
android:layout_height=”wrap_content” | |
android:drawableLeft=”@drawable/ic_g_selector” | |
android:drawablePadding=“8dp” /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<selector xmlns:android=”http://schemas.android.com/apk/res/android"> | |
<item android:drawable=”@drawable/ic_g_translate” /> | |
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toolbar.setNavigationIcon(R.drawable.ic_close); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ImageView | |
android:layout_width=”wrap_content” | |
android:layout_height=”wrap_content” | |
app:srcCompat=“@drawable/ic_close” /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gradle Plugin 2.0+ | |
android { | |
defaultConfig { | |
vectorDrawables.useSupportLibrary = true | |
} | |
} | |
// Gradle Plugin 1.5 | |
android { | |
defaultConfig { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="24dp" | |
android:height="24dp" | |
android:viewportWidth="24" | |
android:viewportHeight="24"> | |
<path | |
android:fillColor="#000000" | |
android:pathData="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Triangle extends View { | |
private Path path; | |
private Paint shapePaint; | |
private int fillColor; | |
private int type; | |
public Triangle(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
init(context, attrs); |