Skip to content

Commit

Permalink
初步完成TranslucentBar设置
Browse files Browse the repository at this point in the history
  • Loading branch information
D-clock committed Feb 3, 2016
1 parent f049d54 commit 0d9b56e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.clock.systemui.ui;

import android.os.Bundle;
import android.view.Window;

import com.clock.systemui.R;
import com.clock.systemui.ui.base.BaseActivity;
Expand All @@ -16,6 +17,7 @@ public class ImageTranslucentBarActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_image_translucent_bar);
}
}
6 changes: 2 additions & 4 deletions src/main/res/layout/activity_image_translucent_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
android:background="@mipmap/env_bg"
android:fitsSystemWindows="true">

</RelativeLayout>
Binary file added src/main/res/mipmap-xhdpi/env_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<style name="ImageTranslucentTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:statusBarColor">#ff0000</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

</resources>

0 comments on commit 0d9b56e

Please sign in to comment.