Use ?android:attr/windowBackground to draw background

This commit is contained in:
seven332 committed 2018-10-18 13:02:25 +08:00
1 parent 6ecce9ddc5
commit 7dc1491c26
3 files changed
+4 -2

No files matched your search

+1
View File
@@ -65,6 +65,7 @@ dependencies {
implementation "com.android.support:design:$supportLibrary"
implementation 'com.github.amlcurran.showcaseview:library:5.4.3'
implementation 'com.github.seven332:android-recaptcha:2bbb3459a8'
implementation 'com.github.seven332:android-resource:0.1.0'
implementation 'com.github.seven332:animator:0.1.0'
implementation 'com.github.seven332:beerbelly:0.1.4'
implementation 'com.github.seven332:conaco:0.1.5-eh'
@@ -24,6 +24,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import com.hippo.android.resource.AttrResources;
import com.hippo.ehviewer.R;
import com.hippo.yorozuya.collect.IntList;
@@ -102,7 +103,7 @@ public class SceneFragment extends Fragment {
super.onViewCreated(view, savedInstanceState);
view.setTag(R.id.fragment_tag, getTag());
view.setBackgroundColor(getResources().getColor(R.color.background_light));
view.setBackgroundDrawable(AttrResources.getAttrDrawable(getContext(), android.R.attr.windowBackground));
// Notify
FragmentActivity activity = getActivity();
+1 -1
View File
@@ -48,7 +48,7 @@
android:layout_height="match_parent"
android:layout_gravity="right"
android:maxWidth="@dimen/drawer_max_width"
android:background="@color/background_light"
android:background="?android:attr/windowBackground"
android:clickable="true"/>
</com.hippo.ehviewer.widget.EhDrawerLayout>