Skip to content

Commit eb296f5

Browse files
Refactoring
1 parent d1fc13a commit eb296f5

File tree

5 files changed

+11
-31
lines changed

5 files changed

+11
-31
lines changed

News-Android-App/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ dependencies {
7979
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
8080
compile 'com.google.code.gson:gson:2.3.1'
8181
compile 'com.jakewharton:butterknife:5.1.+'
82-
compile 'com.sothree.slidinguppanel:library:3.1.1'
82+
compile 'com.sothree.slidinguppanel:library:3.2.1'
8383
compile 'com.squareup.okhttp:okhttp:2.5.0'
8484
compile 'de.greenrobot:eventbus:2.2.1'
8585
compile 'de.greenrobot:greendao:2.0.0'
@@ -94,7 +94,7 @@ dependencies {
9494
testCompile 'junit:junit:4.+'
9595
androidTestCompile 'com.squareup.okhttp:mockwebserver:2.5.0'
9696

97-
androidTestCompile 'com.android.support:support-annotations:23.0.1'
97+
androidTestCompile 'com.android.support:support-annotations:23.1.1'
9898
androidTestCompile 'com.android.support.test:runner:0.3'
9999
androidTestCompile 'com.android.support.test:rules:0.3'
100100
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'

News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/PodcastFragmentActivity.java

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,18 @@
4949

5050
public class PodcastFragmentActivity extends AppCompatActivity implements IPlayPausePodcastClicked {
5151

52-
private PodcastPlaybackService mPodcastPlaybackService;
53-
boolean mBound = false;
54-
55-
56-
private static final String TAG = "PodcastFragmentActivity";
57-
private PodcastFragment mPodcastFragment;
52+
private static final String TAG = PodcastFragmentActivity.class.getCanonicalName();
5853

54+
private PodcastPlaybackService mPodcastPlaybackService;
55+
private boolean mBound = false;
5956
private EventBus eventBus;
57+
private PodcastFragment mPodcastFragment;
58+
private int appHeight;
59+
private int appWidth;
6060

6161
@InjectView(R.id.videoPodcastSurfaceWrapper) ZoomableRelativeLayout rlVideoPodcastSurfaceWrapper;
62-
//@InjectView(R.id.videoPodcastSurface) SurfaceView surfaceView;
6362
@InjectView(R.id.sliding_layout) PodcastSlidingUpPanelLayout sliding_layout;
6463

65-
int appHeight;
66-
int appWidth;
67-
6864

6965
@Override
7066
protected void onPostCreate(Bundle savedInstanceState) {
@@ -90,15 +86,6 @@ public void onGlobalLayout() {
9086

9187
UpdatePodcastView();
9288

93-
/*
94-
new OrientationEventListener(this, SensorManager.SENSOR_DELAY_UI) {
95-
@Override
96-
public void onOrientationChanged(int i) {
97-
sliding_layout.collapsePanel();
98-
}
99-
};
100-
*/
101-
10289
if(isMyServiceRunning(PodcastPlaybackService.class)) {
10390
Intent intent = new Intent(this, PodcastPlaybackService.class);
10491
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
@@ -147,7 +134,6 @@ protected void onResume() {
147134
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
148135
}
149136

150-
//eventBus.post(new RegisterVideoOutput(surfaceView));
151137
super.onResume();
152138
}
153139

@@ -234,19 +220,13 @@ public void onEventMainThread(UpdatePodcastStatusEvent podcast) {
234220
//If file is loaded or preparing and podcast is paused/not running expand the view
235221
if((podcast.isFileLoaded() || podcast.isPreparingFile()) && !currentlyPlaying) {
236222
//Expand view
237-
238223
sliding_layout.setPanelHeight((int) dipToPx(68));
239-
240224
currentlyPlaying = true;
241-
242225
Log.v(TAG, "expanding podcast view!");
243226
} else if(!(podcast.isPreparingFile() || podcast.isFileLoaded()) && currentlyPlaying) { //If file is not loaded or podcast is not preparing file and is playing
244227
//Hide view
245-
246228
sliding_layout.setPanelHeight(0);
247-
248229
currentlyPlaying = false;
249-
250230
Log.v(TAG, "collapsing podcast view!");
251231
}
252232

News-Android-App/src/main/res/layout-sw600dp-land/activity_newsreader.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
android:layout_height="match_parent"
88
android:gravity="bottom"
99
sothree:umanoPanelHeight="68dp"
10-
sothree:umanoParalaxOffset="100dp"
10+
sothree:umanoParallaxOffset="100dp"
1111
sothree:umanoShadowHeight="4dp"> <!-- sothree:dragView="@+id/name" -->
1212

1313
<android.support.design.widget.CoordinatorLayout

News-Android-App/src/main/res/layout/activity_news_detail.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
android:gravity="bottom"
1515
sothree:umanoPanelHeight="68dp"
1616
sothree:umanoShadowHeight="4dp"
17-
sothree:umanoParalaxOffset="100dp"
17+
sothree:umanoParallaxOffset="100dp"
1818
sothree:umanoDragView="@+id/name">
1919

2020
<android.support.v4.view.ViewPager

News-Android-App/src/main/res/layout/activity_newsreader.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
android:layout_height="match_parent"
88
android:gravity="bottom"
99
sothree:umanoPanelHeight="68dp"
10-
sothree:umanoParalaxOffset="100dp"
10+
sothree:umanoParallaxOffset="100dp"
1111
sothree:umanoShadowHeight="4dp"> <!-- sothree:dragView="@+id/name" -->
1212

1313
<android.support.v4.widget.DrawerLayout

0 commit comments

Comments
 (0)