mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
set ReorderingAllowd for Fragments and some other small changes
This commit is contained in:
parent
6c6000ba02
commit
e363879708
2 changed files with 5 additions and 4 deletions
|
@ -32,14 +32,11 @@ import retrofit2.converter.gson.GsonConverterFactory;
|
|||
|
||||
public class ChaosflixViewModel extends ViewModel {
|
||||
|
||||
private static final String TAG = ChaosflixViewModel.class.getSimpleName();
|
||||
private final StreamingService mStreamingApi;
|
||||
private final RecordingService mRecordingApi;
|
||||
|
||||
public ChaosflixViewModel(String recordingUrl, String streamingUrl){
|
||||
// Resources resources = context.getResources();
|
||||
// String recordingUrl = resources.getString(R.string.api_media_ccc_url);
|
||||
// String streamingUrl = resources.getString(R.string.streaming_media_ccc_url);
|
||||
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
GsonConverterFactory gsonConverterFactory = GsonConverterFactory.create();
|
||||
RxJava2CallAdapterFactory rxJava2CallAdapterFactory = RxJava2CallAdapterFactory.create();
|
||||
|
@ -63,6 +60,7 @@ public class ChaosflixViewModel extends ViewModel {
|
|||
|
||||
public Observable<ConferencesWrapper> getConferencesWrapper() {
|
||||
return mRecordingApi.getConferences()
|
||||
.doOnError(throwable -> Log.d(TAG, String.valueOf(throwable.getCause())))
|
||||
.subscribeOn(Schedulers.io());
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.support.v7.app.AppCompatActivity;
|
|||
import android.support.v7.widget.Toolbar;
|
||||
import android.transition.Slide;
|
||||
import android.transition.TransitionInflater;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
|
@ -99,6 +100,7 @@ public class BrowseActivity extends AppCompatActivity implements
|
|||
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
ft.replace(R.id.fragment_container, eventsFragment);
|
||||
ft.setReorderingAllowed(true);
|
||||
ft.addToBackStack(null);
|
||||
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
|
||||
ft.commit();
|
||||
|
@ -120,6 +122,7 @@ public class BrowseActivity extends AppCompatActivity implements
|
|||
FragmentTransaction ft = fm.beginTransaction();
|
||||
ft.replace(R.id.fragment_container, detailsFragment);
|
||||
ft.addToBackStack(null);
|
||||
ft.setReorderingAllowed(true);
|
||||
|
||||
View thumb = v.findViewById(R.id.imageView);
|
||||
ft.addSharedElement(thumb,ViewCompat.getTransitionName(thumb));
|
||||
|
|
Loading…
Reference in a new issue