Skip to content

Instantly share code, notes, and snippets.

View FranRiadigos's full-sized avatar

Fran Riádigos FranRiadigos

View GitHub Profile
@FranRiadigos
FranRiadigos / build.gradle
Last active June 15, 2018 10:24
Example of overriding an apk name with custom values and signed or unsigned suffix.
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName =
"${project.name.toLowerCase()}-" + // app
"${variant.flavorName}-" + // develop
"${variant.buildType.name}-" + // debug
"${versionCode}" + // 10101
(variant.buildType.name.contains("release")
&& !variant.signingReady ? "-unsigned" : "") + // unsigned
@FranRiadigos
FranRiadigos / relative_constraint_guideline.xml
Last active July 5, 2018 09:22
Relative Guidelines with ConstraintLayouts. Helper code utilised in the article https://medium.com/@kuassivi/relative-guidelines-w-constraintlayouts-9533b3c546f3
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true">
<!-- This View acts like a helper guideline
and anchors to the "relative_view" TextView. -->
<View