Commit 86dc884e authored by Adrien Maglo's avatar Adrien Maglo
Browse files

GUI: add a slight shadow on top of the mini player

parent b39f8f7a
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient
android:angle="90"
android:endColor="#00000000"
android:startColor="@color/item_footer" />
<size
android:height="5dp"
android:width="30dp" />
</shape>
\ No newline at end of file
......@@ -868,11 +868,14 @@ public class MainActivity extends SherlockFragmentActivity {
@Override
public void onPanelOpened() {
mSlidingPane.setShadowResource(R.drawable.mini_player_top_shadow);
mAudioPlayer.setHeaderVisibilities(false, false, true, true, true);
}
@Override
public void onPanelOpenedEntirely() {}
public void onPanelOpenedEntirely() {
mSlidingPane.setShadowDrawable(null);
}
@Override
public void onPanelClosed() {
......
......@@ -748,11 +748,11 @@ public class SlidingPaneLayout extends ViewGroup {
return;
}
final int shadowWidth = mShadowDrawable.getIntrinsicWidth();
final int right = shadowView.getLeft();
final int top = shadowView.getTop();
final int bottom = shadowView.getBottom();
final int left = right - shadowWidth;
final int shadowHeight = mShadowDrawable.getIntrinsicHeight();
final int right = shadowView.getRight();
final int left = shadowView.getLeft();
final int bottom = shadowView.getTop();
final int top = bottom - shadowHeight;
mShadowDrawable.setBounds(left, top, right, bottom);
mShadowDrawable.draw(c);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment