Android微信支付開發 ,回退鍵 介面閃動問題處理。
阿新 • • 發佈:2019-02-11
@Override public void onResp(BaseResp resp) { Log.d("+++++++++++++++++++","微信支付回撥"); if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) { EventBusCustom eventBusCustom = new EventBusCustom(EventBusCustom.WXPAY_RESULT,resp.errCode,null); EventBus.getDefault().postSticky(eventBusCustom);// AlertDialog.Builder builder = new AlertDialog.Builder(this); // builder.setTitle("返回結果"); // builder.setMessage("微信支付結果:%s"+ resp.errStr +";code=" + String.valueOf(resp.errCode)); // builder.show(); } finish(); overridePendingTransition(0,0); }
<activity android:name=".wxapi.WXPayEntryActivity"android:exported="true" android:theme="@style/wx_theme" android:launchMode="singleTop" />
<style name="wx_theme" parent="AppTheme"> <!--<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar">--> <!-- Customize your theme here. --> <item name="android:windowBackground">@color/translucent</item> <item name="android:windowIsTranslucent">true</item> </style>