对于Android 5.0及更高版本?
我该如何实现呢?我在StackOverFlow或Android开发者网站上找不到任何解决方案.
我建议我可以使状态栏透明,并在状态栏下绘制渐变可绘制.但是问题很少.
第一个问题是形状可绘制的通常渐变不支持Material Design规范http://www.google.com/design/spec/style/imagery.html 
第二个问题是我不能将地图片段适合windows android:fitsSystemWindows="true".
我正在修改Android 4.0.3.r1的自定义导航栏,并希望发送"Home"和"Back"等关键事件.我的应用程序不是一个系统:
IWindowManager mWindowManager = IWindowManager.Stub.asInterface(
ServiceManager.getService(Context.WINDOW_SERVICE));
mWindowManager.injectKeyEvent( ev, false );
Run Code Online (Sandbox Code Playgroud)
它不起作用,因为我无法android.permission.INJECT_EVENTS从系统应用程序中获取.我怎样才能做到这一点?
当活动将一个转移到另一个共享元素时,它们会在新活动的屏幕上显示,覆盖导航栏,如图所示

您还可以在视频视图叠加导航栏中看到此错误
我使用以下代码来解析Google Play应用内结算中的价格:
private static Number parsePrice(String priceFromGoogle) {
Locale currencyLocale = getCurrencyLocale(priceFromGoogle);
NumberFormat numberFormat = NumberFormat.getCurrencyInstance(currencyLocale);
Number number = null;
try {
number = numberFormat.parse(priceFromGoogle);
} catch (ParseException e) {
e.printStackTrace();
}
return number;
}
private Locale getCurrencyLocale(String price) {
Locale locale = null;
for (Locale availableLocale : Locale.getAvailableLocales()) {
NumberFormat numberFormat = NumberFormat.getCurrencyInstance(availableLocale);
try {
numberFormat.parse(price);
locale = availableLocale;
break;
} catch (ParseException e) {
//do nothing
}
}
return locale;
}
Run Code Online (Sandbox Code Playgroud)
它在我的测试设备和我的语言环境中工作正常.但在某些设备和某些国家/地区,我遇到的价格如下:"Php1,337.07","US $ 29.99","MX $ 374.79".我的方法在这种情况下不起作用.
有没有通用的方法来解决这个问题?
我无法找到有关Kotlin中按位运算符的计算顺序的信息.它是否与Java相同,或者它们从左到右计算而没有任何优先级?
当我layout_marginLeft在代码中使用或设置左边距时,它可以用作layout_marginRight.此行为被视为当我放置View用layout_marginLeft在FrameLayout或在Android API <11的布局的根.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:background="#77cc99"
>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:background="#eebbaa">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, MyActivity"
/>
</FrameLayout>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)