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
package net.frakbot.gists.widgethelper; | |
/* | |
* Copyright 2014 Sebastiano Poggi | |
* | |
* 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 |
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
Android Fragment Dialog |
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 javax.xml.xpath.XPathConstants | |
import javax.xml.xpath.XPathFactory | |
// Set output filename of APK based on version code from manifest when doing release build | |
// Note: This script will add a couple of seconds to the build script build time | |
gradle.projectsEvaluated { | |
preReleaseBuild.doFirst { | |
android.applicationVariants.all { variant -> | |
// Check version number configured in AndroidManifest | |
if (variant.name != "release") return |
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.content.Intent; | |
import android.support.annotation.NonNull; | |
import java.io.Serializable; | |
import java.util.Map; | |
/** | |
* Provides a way to wrap a serializable {@link Map} in order to preserve its class | |
* during serialization inside an {@link Intent}, otherwise it would be "flattened" | |
* in a {@link android.os.Parcel} and unparceled as a {@link java.util.HashMap}. |
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
===== Results of comparing two JARs ===== | |
Generated by @ https://github.com/JustinAngel/compareJars | |
Showing API additions only. Removed APIs aren't shown. | |
Comparing 3479 classes from C:\Program Files (x86)\Android\sdk\platforms\android-MNC\android.jar | |
To 3683 classes from C:\Program Files (x86)\Android\sdk\platforms\android-22\android.jar | |
public static final class android.Manifest$permission extends Object { |
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"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/main_content" | |
style="@style/match"> | |
<android.support.v7.widget.RecyclerView | |
android:id="@+id/recyclerview" | |
style="@style/match" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> |
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
/** | |
* This method convets dp unit to equivalent device specific value in pixels. | |
* | |
* @param dp A value in dp(Device independent pixels) unit. Which we need to convert into pixels | |
* @param context Context to get resources and device specific display metrics | |
* @return A float value to represent Pixels equivalent to dp according to device | |
*/ | |
public static float convertDpToPixel(float dp,Context context){ | |
Resources resources = context.getResources(); | |
DisplayMetrics metrics = resources.getDisplayMetrics(); |
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
#include <map> | |
#include <typeinfo> | |
#include <set> | |
typedef size_t EntityID; | |
struct BaseComponent | |
{ | |
virtual ~BaseComponent(){}; | |
EntityID BelongsTo; | |
}; |
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
#!/bin/sh | |
width=$1 | |
openInPreview=$2 | |
timestamp=$(date +%s) | |
filepath=/sdcard/$timestamp.png | |
echo $filepath |
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) 2013 Google, 2014 Stefano Dacchille | |
* | |
* 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 |
OlderNewer