<resources>
<!
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<!
<item name="windowActionBar">false</item>
<!
<item name="windowNoTitle">true</item>
<!
<item name="android:windowFullscreen">true</item>
</style>
</resources>
public static String GetVersion (Context context) {
try {
PackageInfo manager = context.getPackageManager().getPackageInfo(
context.getPackageName(), 0);
return manager. versionName;
} catch (NameNotFoundException e) {
return "Unknown";
}
}
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
public static void showToast( final String toast, final Context context)
{
new Thread( new Runnable() {
@Override
public void run() {
Looper. prepare();
Toast. makeText(context, toast, Toast.LENGTH_SHORT).show();
Looper. loop();
}
}).start();
}
public static String getImei(Context context, String imei) {
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE );
imei = telephonyManager.getDeviceId();
} catch (Exception e) {
Log. e(ExampleUtil.class.getSimpleName(), e.getMessage());
}
return imei;
}