Skip to content

Instantly share code, notes, and snippets.

View zirouan's full-sized avatar
🚀
Be Bold

Rudson Lima zirouan

🚀
Be Bold
View GitHub Profile
@zirouan
zirouan / Color theme - NavigationDrawer-Material Design
Last active August 22, 2017 12:36
Color theme - NavigationDrawer-Material Design
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="nliveo_white">#ffffff</color>
<color name="nliveo_grey">#e0e0e0</color>
<color name="nliveo_black">#000000</color>
<color name="nliveo_transparent">#00000000</color>
<color name="nliveo_blue_colorPrimary">#2196F3</color>
<color name="nliveo_blue_colorPrimaryDark">#1976D2</color>
<color name="nliveo_blue_alpha_colorPrimaryDark">#801976D2</color>
@zirouan
zirouan / Other methods - Navigation Drawer - Material Design
Last active August 29, 2015 14:13
Other methods - Navigation Drawer - Material Design
/*{ First item of the position selected from the list }*/
public void setDefaultStartPositionNavigation(int position){}
/*{ get position in the last clicked item list }*/
public int getCurrentPosition(){}
/*{ If not want to use the footer item just put false }*/
public void setFooterNavigationVisible(boolean visible){}
/*{ Item color selected in the list - name and icon }*/
@zirouan
zirouan / gradle.properties library
Last active August 29, 2015 14:14
gradle.properties library
POM_NAME=Project name
POM_ARTIFACT_ID=Artifact name
POM_PACKAGING=aar
VERSION_NAME=version
VERSION_CODE=1
GROUP=group id
POM_DESCRIPTION=Navigation Drawer - Material Design
POM_URL=https://github.com/rudsonlive/NavigationDrawer-MaterialDesign
POM_SCM_URL=https://github.com/rudsonlive/NavigationDrawer-MaterialDesign
@zirouan
zirouan / build.gradle library
Last active August 29, 2015 14:14
build.gradle library
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/content/repositories/snapshots")
pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME
}
@zirouan
zirouan / OnScrollListener
Last active June 13, 2019 12:09
RecyclerView - OnScrollListener
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.FrameLayout;
public abstract class OnScrollListener extends RecyclerView.OnScrollListener {
-Xms128m
-Xmx4096m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=200m
-XX:+UseCompressedOops
@zirouan
zirouan / .gitignore
Last active September 22, 2016 11:20
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@zirouan
zirouan / gcmserver.php
Last active October 2, 2015 15:05
Simples serviço de registro de Ids GCM
<?php
$acao = $_POST['acao'];
$dispositivos = "dispositivos.txt";
if ($acao == "registrar") {
$fp = fopen($dispositivos, "a+") or die("Erro ao abrir arquivo!");
$registrationId = $_POST['regId'] ."\n";
fwrite($fp, $registrationId) or die("Erro ao escrever no arquivo!");
@zirouan
zirouan / index.html
Created October 2, 2015 10:55
Formulário simples de envio de mensagens.
<html>
<head>
<title>Exemplo GCM</title>
</head>
<body>
<form method="post" action="gcmserver.php">
<input type="hidden" name="acao" value="enviar">
Mensagem:<input type="text" name="mensagem"><br>
<input type="submit" value="OK">
</form>
@zirouan
zirouan / EachDirectoryPath.md
Created July 16, 2016 18:07 — forked from granoeste/EachDirectoryPath.md
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories