From 15d87935813d62a6d455de344f26f09495f11bb1 Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Fri, 8 Nov 2013 15:16:14 -0500 Subject: [PATCH] removed drawer shadow (memory consumption) --- res/layout/activity_sflphone_home.xml | 3 ++- res/layout/contact_drawer.xml | 32 +++++++++++------------ src/org/sflphone/client/HomeActivity.java | 7 +---- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/res/layout/activity_sflphone_home.xml b/res/layout/activity_sflphone_home.xml index 35b606546..9f004e412 100644 --- a/res/layout/activity_sflphone_home.xml +++ b/res/layout/activity_sflphone_home.xml @@ -34,7 +34,8 @@ as that of the covered work. xmlns:app="http://schemas.android.com/apk/res/org.sflphone" android:id="@+id/drawer_layout" android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="match_parent" + android:background="@color/sfl_dark_blue" > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" diff --git a/res/layout/contact_drawer.xml b/res/layout/contact_drawer.xml index f3c1de488..d43554880 100644 --- a/res/layout/contact_drawer.xml +++ b/res/layout/contact_drawer.xml @@ -44,23 +44,23 @@ as that of the covered work. android:layout_width="match_parent" android:layout_height="72dp" > - <ImageView - android:id="@+id/menu_top_shadow_left" - android:layout_width="0dp" - android:layout_height="4dp" - android:layout_above="@+id/coucou" - android:layout_alignParentLeft="true" - android:layout_toLeftOf="@+id/hello" - android:src="@drawable/defaultshadowtop" /> +<!-- <ImageView --> +<!-- android:id="@+id/menu_top_shadow_left" --> +<!-- android:layout_width="0dp" --> +<!-- android:layout_height="4dp" --> +<!-- android:layout_above="@+id/coucou" --> +<!-- android:layout_alignParentLeft="true" --> +<!-- android:layout_toLeftOf="@+id/hello" --> +<!-- android:src="@drawable/defaultshadowtop" /> --> - <ImageView - android:id="@+id/menu_top_shadow_right" - android:layout_width="0dp" - android:layout_height="4dp" - android:layout_above="@+id/coucou" - android:layout_alignParentRight="true" - android:layout_toRightOf="@+id/hello" - android:src="@drawable/defaultshadowtop" /> +<!-- <ImageView --> +<!-- android:id="@+id/menu_top_shadow_right" --> +<!-- android:layout_width="0dp" --> +<!-- android:layout_height="4dp" --> +<!-- android:layout_above="@+id/coucou" --> +<!-- android:layout_alignParentRight="true" --> +<!-- android:layout_toRightOf="@+id/hello" --> +<!-- android:src="@drawable/defaultshadowtop" /> --> <RelativeLayout android:id="@+id/coucou" diff --git a/src/org/sflphone/client/HomeActivity.java b/src/org/sflphone/client/HomeActivity.java index 1f812b9a0..9782a49a9 100644 --- a/src/org/sflphone/client/HomeActivity.java +++ b/src/org/sflphone/client/HomeActivity.java @@ -164,17 +164,12 @@ public class HomeActivity extends Activity implements DialingFragment.Callbacks, @Override public void onScrollEnded() { - if (!mContactDrawer.isOpened()) { - mShadow.setAlpha(0f); - } + } @Override public void onScroll(int offset) { - float relativeOffset = offset + getResources().getDimension(R.dimen.contact_drawer_handle_height); - float alpha = 1 - (((float) relativeOffset) / ((float) getResources().getDisplayMetrics().heightPixels)); - mShadow.setAlpha(alpha); if (offset < 400) { getActionBar().hide(); // mNavigationDrawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); -- GitLab