Update drawer shadow

* Don't set drawable on API 21+
* Copy drawer shadows from Google sample
pull/848/head
Alex Baker 6 years ago
parent 24c2206b71
commit 8b5aeb3daa

@ -4,6 +4,7 @@ import static android.app.Activity.RESULT_OK;
import static com.google.common.collect.Iterables.filter; import static com.google.common.collect.Iterables.filter;
import static com.todoroo.andlib.utility.AndroidUtilities.assertNotMainThread; import static com.todoroo.andlib.utility.AndroidUtilities.assertNotMainThread;
import static com.todoroo.andlib.utility.AndroidUtilities.atLeastLollipop; import static com.todoroo.andlib.utility.AndroidUtilities.atLeastLollipop;
import static com.todoroo.andlib.utility.AndroidUtilities.preLollipop;
import static org.tasks.LocalBroadcastManager.REFRESH; import static org.tasks.LocalBroadcastManager.REFRESH;
import static org.tasks.LocalBroadcastManager.REFRESH_LIST; import static org.tasks.LocalBroadcastManager.REFRESH_LIST;
import static org.tasks.billing.PurchaseDialog.newPurchaseDialog; import static org.tasks.billing.PurchaseDialog.newPurchaseDialog;
@ -173,8 +174,10 @@ public class NavigationDrawerFragment extends InjectingFragment {
mFragmentContainerView = getActivity().findViewById(FRAGMENT_NAVIGATION_DRAWER); mFragmentContainerView = getActivity().findViewById(FRAGMENT_NAVIGATION_DRAWER);
mDrawerLayout = drawerLayout; mDrawerLayout = drawerLayout;
// set a custom shadow that overlays the main content when the drawer opens if (preLollipop()) {
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); // set a custom shadow that overlays the main content when the drawer opens
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
}
} }
public void setSelected(Filter selected) { public void setSelected(Filter selected) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Loading…
Cancel
Save