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 com.kirin.ui; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* SquareView - create View Container with square Size | |
* @author 阿目 | |
* ViewGroup can be Relativelayout,Linearlayout as you like |
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 com.kirin.util; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; |
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 com.kirin.util; | |
import java.util.ArrayList; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
public class SimpleLocalStorage { | |
public static String PREFS_NAME = "SimpleLocalStorage"; |
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
/** | |
* @author Kevin Kowalewski | |
* | |
*/ | |
public class Root { | |
private static String LOG_TAG = Root.class.getName(); | |
public boolean isDeviceRooted() { | |
if (checkRootMethod1()){return true;} |
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 com.kirin.ui; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import android.content.Context; | |
import android.content.res.AssetManager; | |
import android.graphics.Bitmap; | |
import android.util.AttributeSet; |
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
//<meta name="viewport" content="width=device-width,height=device-height,user-scalable=yes,target-densitydpi=220,initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0" /> | |
var viewportContent = ''; | |
if ((window.devicePixelRatio <= 1 && window.outerWidth > 1024) { | |
console.log(" Special Case -> big screen but device pixel ratio is 1 window.outerWidth : " + window.outerWidth + " window.outerHeight " + window.outerHeight); | |
viewportContent = 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes, target-densityDpi=device-dpi'; | |
} else if ((window.devicePixelRatio <= 1) { | |
console.log(" RATIO == 1"); | |
viewportContent = 'width=device-width,height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes, target-densityDpi=220'; | |
} else if ((window.devicePixelRatio <= 1.3) { | |
console.log(" RATIO == 1.3"); |
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.os.Build; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.os.Build; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.animation.AlphaAnimation; | |
/** | |
* |
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
// Something wrong in the API DEMO | |
private Size getOptimalPreviewSize(List<Size> sizes, int w, int h) { | |
final double ASPECT_TOLERANCE = 0.17; | |
double targetRatio = (double) h / w; | |
if (sizes == null) return null; | |
Size optimalSize = null; | |
double minDiff = Double.MAX_VALUE; |
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"?> | |
<resources> | |
<color name="white">#FFFFFF</color> | |
<color name="yellow">#FFFF00</color> | |
<color name="fuchsia">#FF00FF</color> | |
<color name="red">#FF0000</color> | |
<color name="silver">#C0C0C0</color> | |
<color name="gray">#808080</color> | |
<color name="olive">#808000</color> | |
<color name="purple">#800080</color> |
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.app.AlertDialog; | |
import android.app.Dialog; | |
import android.app.DialogFragment; | |
import android.app.FragmentManager; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.content.res.Resources; | |
import android.os.Bundle; | |
import android.util.DisplayMetrics; | |
import android.util.Log; |
OlderNewer