add reveal animation to settings button
This commit is contained in:
parent
655b3e873e
commit
52adc29715
@ -3,6 +3,8 @@ package org.fox.ttrss;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.app.ActivityOptionsCompat;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.util.TypedValue;
|
||||
@ -51,7 +53,12 @@ public abstract class BaseFeedlistFragment extends Fragment {
|
||||
try {
|
||||
Intent intent = new Intent(getActivity(),
|
||||
PreferencesActivity.class);
|
||||
startActivityForResult(intent, 0);
|
||||
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(getActivity(), v, "SETTINGS_REVEAL");
|
||||
|
||||
ActivityCompat.startActivityForResult(getActivity(), intent, 0, options.toBundle());
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:transitionName="SETTINGS_REVEAL"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -28,6 +28,7 @@
|
||||
android:clickable="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:transitionName="SETTINGS_REVEAL"
|
||||
android:background="@drawable/ripple" />
|
||||
|
||||
<LinearLayout
|
||||
|
Loading…
Reference in New Issue
Block a user