Skip to content

Commit

Permalink
✨ 支持横屏,close eleme#20
Browse files Browse the repository at this point in the history
  • Loading branch information
linjiang committed May 26, 2018
1 parent 68e75e7 commit a06f188
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="me.ele.uetool.sample.MainActivity"
android:screenOrientation="portrait">
android:name="me.ele.uetool.sample.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
1 change: 0 additions & 1 deletion uetool/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<activity
android:name="me.ele.uetool.TransparentActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/uet_Theme.AppCompat.Translucent"/>
</application>

Expand Down
4 changes: 4 additions & 0 deletions uetool/src/main/java/me/ele/uetool/TransparentActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public class TransparentActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
finish();
return;
}
Util.setStatusBarColor(getWindow(), Color.TRANSPARENT);
Util.enableFullscreen(getWindow());
setContentView(R.layout.uet_activity_transparent);
Expand Down

0 comments on commit a06f188

Please sign in to comment.