Skip to content

Instantly share code, notes, and snippets.

Jens jensgreiner

  • Germany
Block or report user

Report or block jensgreiner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jensgreiner
jensgreiner / build.gradle
Created Oct 13, 2017
Repository maven.google.com
View build.gradle
maven { url 'https://maven.google.com' }
@jensgreiner
jensgreiner / PetContract.java
Created Jul 4, 2017
Contract class for pets database to define tables and constants used with the database (sqlite)
View PetContract.java
package com.example.android.pets.data;
import android.provider.BaseColumns;
/**
* Contract class for pets database
* Created by Jens Greiner on 04.07.17.
*/
public final class PetContract {
@jensgreiner
jensgreiner / build.gradle
Last active Jul 15, 2017
Add auto incremented versionCode using a properties file
View build.gradle
/**
* Adds auto incremented versionCode number
* Found on stackoverflow
* see https://stackoverflow.com/a/25166200/1469260
*/
def Properties versionProps = new Properties()
def versionPropsFile = file('version.properties')
if (versionPropsFile.exists())
versionProps.load(new FileInputStream(versionPropsFile))
def code = (versionProps['VERSION_CODE'] ?: "0").toInteger() + 1
@jensgreiner
jensgreiner / ReportCard.java
Created May 20, 2017
Udacity Android Basics Nanodegree - Homework to make a single java object holding a students report card
View ReportCard.java
package com.greinerco.udacity.reportcard;
import java.util.ArrayList;
import java.util.Iterator;
/**
* This single class is part of a Udacity Android Basics Nanodegree (EU) homework
* This POJO should store and provide the data of a students report card
* Created by Jens Greiner on 20.05.17.
*/
You can’t perform that action at this time.