weex通過navigator.push的方式跳轉頁面,頁面不顯示問題
阿新 • • 發佈:2019-02-15
在安卓裡,weex是使用Activity的category name來確定使用哪個Activity來渲染weex的。你需要自己定義Activity,如果是使用weexpack生成的android工程,那是設定好的。
<activity
android:name=".WXPageActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="com.alibaba.weex.protocol.openurl"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="com.taobao.android.intent.category.WEEX"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:scheme="file"/>
</intent-filter>
</activity>
WXPageActivity 是你自己定義的Activity 用來渲染weex的js介面
<category android:name="com.taobao.android.intent.category.WEEX"/>