Update AndroidSlidingUpPanel to v1.0.3

This commit is contained in:
David Development 2014-06-27 17:55:38 +02:00
parent a0c33de6a7
commit 7302b26d9c
6 changed files with 18 additions and 11 deletions

View file

@ -60,8 +60,8 @@
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="library-1.0.1" level="project" />
<orderEntry type="library" exported="" name="eventbus-2.2.1" level="project" />
<orderEntry type="library" exported="" name="library-1.0.3" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" />
<orderEntry type="library" exported="" name="extra-abs-0.9.9" level="project" />
<orderEntry type="library" exported="" name="support-v4-19.1.0" level="project" />

View file

@ -349,9 +349,9 @@ public class NewsDetailActivity extends SherlockFragmentActivity {
@Override
public void onBackPressed() {
if(podcastFragment != null && sliding_layout.isExpanded()) {
if(podcastFragment != null && sliding_layout.isPanelExpanded()) {
if (!podcastFragment.onBackPressed())
sliding_layout.collapsePane();
sliding_layout.collapsePanel();
} else
super.onBackPressed();
}
@ -383,9 +383,9 @@ public class NewsDetailActivity extends SherlockFragmentActivity {
switch (item.getItemId()) {
case android.R.id.home:
if(podcastFragment != null && sliding_layout.isExpanded()) {
if(podcastFragment != null && sliding_layout.isPanelExpanded()) {
if (!podcastFragment.onBackPressed())
sliding_layout.collapsePane();
sliding_layout.collapsePanel();
} else {
super.onBackPressed();
}

View file

@ -481,9 +481,9 @@ public class NewsReaderListActivity extends MenuUtilsSherlockFragmentActivity im
@Override
public void onBackPressed() {
if(podcastFragment != null && sliding_layout.isExpanded()) {
if(podcastFragment != null && sliding_layout.isPanelExpanded()) {
if (!podcastFragment.onBackPressed())
sliding_layout.collapsePane();
sliding_layout.collapsePanel();
} else if(mSlidingLayout.isOpen())
super.onBackPressed();
else
@ -502,9 +502,9 @@ public class NewsReaderListActivity extends MenuUtilsSherlockFragmentActivity im
switch (item.getItemId()) {
case android.R.id.home:
if(podcastFragment != null && sliding_layout.isExpanded()) {
if(podcastFragment != null && sliding_layout.isPanelExpanded()) {
if (!podcastFragment.onBackPressed())
sliding_layout.collapsePane();
sliding_layout.collapsePanel();
}
else if(!mSlidingLayout.isOpen())
mSlidingLayout.openPane();

View file

@ -378,6 +378,11 @@ public class PodcastFragment extends SherlockFragment {
public void onPanelAnchored(View view) {
}
@Override
public void onPanelHidden(View view) {
}
};
boolean blockSeekbarUpdate = false;

View file

@ -46,8 +46,10 @@ public class PodcastSlidingUpPanelLayout extends SlidingUpPanelLayout{
private boolean isDragViewHit(int x, int y) {
//original implementation - only allow dragging on mDragView
View v = isExpanded() ? mDragView : mSlideableView;
View v = isPanelExpanded() ? mDragView : mSlideableView;
if (v == null) return false;
int[] viewLocation = new int[2];
v.getLocationOnScreen(viewLocation);

View file

@ -12,7 +12,7 @@
<ViewSwitcher
android:id="@+id/viewSwitcherProgress"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_height="68dp"
android:inAnimation="@android:anim/fade_in"
android:outAnimation="@android:anim/fade_out">