Skip to content

Instantly share code, notes, and snippets.

View macsystems's full-sized avatar
🏠
Working from home

Jens Hohl macsystems

🏠
Working from home
View GitHub Profile
@macsystems
macsystems / build.gradle
Created May 3, 2015 10:42
Get Implementation-Version from Jar(s)
/**
* Returns the Version from the Manifest Entry
* @return
*/
String getVersion() {
def files = fileTree(include: ['*.jar'], dir: 'libs')
def latestVersion;
for (File file : files) {
def jar = new JarFile(file);
@macsystems
macsystems / CoreDatePickerDialogFragment.java
Last active August 29, 2015 14:10
An DatePicker Dialog Fragment which respects rotation change. Also you can customize the setMin/Max Date using the extended OnDateSetListener interface.
public class CoreDatePickerDialogFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener {
public final static String TAG = CoreDatePickerDialogFragment.class.getName();
private final static int REQUEST_CODE = -1;
private final static String SAVED_PICKER_STATE = "CoreDatePickerDialogFragment.internal_state";
private DatePickerDialog datePickerDialog;
private CoreOnDateSetListener callback;