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
System: Host: gs40 Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0) | |
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.2) dm: mdm Distro: Linux Mint 18.1 Serena | |
Machine: Mobo: Micro-Star model: MS-14A2 v: REV:1.0 | |
Bios: American Megatrends v: E14A2IMS.103 date: 04/19/2016 | |
CPU: Quad core Intel Core i7-6700HQ (-HT-MCP-) cache: 6144 KB | |
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20735 | |
clock speeds: min/max: 800/3500 MHz 1: 2054 MHz 2: 1185 MHz 3: 803 MHz 4: 799 MHz 5: 803 MHz | |
6: 800 MHz 7: 800 MHz 8: 830 MHz | |
Graphics: Card-1: Intel Skylake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:191b | |
Card-2: NVIDIA GM107M [GeForce GTX 960M] bus-ID: 01:00.0 chip-ID: 10de:139b |
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
/* | |
* Copyright (C) 2016 Jeff Gilfelt. | |
* | |
* 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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"?> | |
<resources> | |
<color name="material_red50">#ffffebee</color> | |
<color name="material_red100">#ffffcdd2</color> | |
<color name="material_red200">#ffef9a9a</color> | |
<color name="material_red300">#ffe57373</color> | |
<color name="material_red400">#ffef5350</color> | |
<color name="material_red500">#fff44336</color> | |
<color name="material_red600">#ffe53935</color> | |
<color name="material_red700">#ffd32f2f</color> |
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 ScrollViewWithMaxHeight extends ScrollView { | |
public static int WITHOUT_MAX_HEIGHT_VALUE = -1; | |
private int maxHeight = WITHOUT_MAX_HEIGHT_VALUE; | |
public ScrollViewWithMaxHeight(Context context) { | |
super(context); | |
} |
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
import android.graphics.*; | |
import com.squareup.picasso.Transformation; | |
/** | |
* Transforms an image into a circle representation. Such as a avatar. | |
*/ | |
public class CircularTransformation implements Transformation | |
{ | |
int radius = 10; |
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
/* | |
* Copyright 2014 Chris Banes | |
* | |
* 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
put card.xml in your drawables directory, put colors.xml in your values directory or add the colors to your colors.xml file. | |
set the background of a view to card, | |
as you can see in card.xml the drawable handles the card margin, so you don't have to add a margin to your view | |
``` xml | |
<View | |
android:layout_width="fill_parent" |