Add shadow image for drawer in pre-L

This commit is contained in:
seven332 committed 2016-03-16 18:32:16 +08:00
1 parent 83b0d1e961
commit bf97290e57
9 files changed
+7

No files matched your search

@@ -19,6 +19,7 @@ package com.hippo.ehviewer.ui;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.IdRes;
@@ -264,6 +265,12 @@ public final class MainActivity extends StageActivity
mAvatar = (LoadImageView) ViewUtils.$$(headerLayout, R.id.avatar);
mDisplayName = (TextView) ViewUtils.$$(headerLayout, R.id.display_name);
// Pre-L need shadow drawable
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow_left, Gravity.LEFT);
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow_right, Gravity.RIGHT);
}
updateProfile();
if (mNavView != null) {