Merge branch 'animate_transitions' into stom79_baseline
This commit is contained in:
commit
956e0ba963
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
package org.eu.exodus_privacy.exodusprivacy;
|
package org.eu.exodus_privacy.exodusprivacy;
|
||||||
|
|
||||||
import android.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.app.FragmentTransaction;
|
|
||||||
import android.databinding.DataBindingUtil;
|
import android.databinding.DataBindingUtil;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
@ -70,26 +70,28 @@ public class MainActivity extends AppCompatActivity {
|
||||||
ApplicationListAdapter.OnAppClickListener onAppClickListener = packageInfo -> {
|
ApplicationListAdapter.OnAppClickListener onAppClickListener = packageInfo -> {
|
||||||
|
|
||||||
report = ReportFragment.newInstance(getPackageManager(),packageInfo);
|
report = ReportFragment.newInstance(getPackageManager(),packageInfo);
|
||||||
FragmentManager manager = getFragmentManager();
|
FragmentManager manager = getSupportFragmentManager();
|
||||||
FragmentTransaction transaction = manager.beginTransaction();
|
FragmentTransaction transaction = manager.beginTransaction();
|
||||||
transaction.addToBackStack(null);
|
transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_right, R.anim.slide_in_left, R.anim.slide_out_left)
|
||||||
transaction.replace(R.id.fragment_container,report);
|
.replace(R.id.fragment_container,report)
|
||||||
transaction.commit();
|
.addToBackStack(null)
|
||||||
|
.commit();
|
||||||
};
|
};
|
||||||
|
|
||||||
appList = AppListFragment.newInstance(networkListener,onAppClickListener);
|
appList = AppListFragment.newInstance(networkListener,onAppClickListener);
|
||||||
|
|
||||||
|
|
||||||
FragmentManager manager = getFragmentManager();
|
FragmentManager manager = getSupportFragmentManager();
|
||||||
FragmentTransaction transaction = manager.beginTransaction();
|
FragmentTransaction transaction = manager.beginTransaction();
|
||||||
transaction.replace(R.id.fragment_container,appList);
|
transaction.replace(R.id.fragment_container,appList)
|
||||||
transaction.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
super.onBackPressed();
|
if (getSupportFragmentManager().getBackStackEntryCount() == 0)
|
||||||
if(report != null)
|
finish();
|
||||||
report = null;
|
else
|
||||||
|
getSupportFragmentManager().popBackStack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,22 +19,17 @@
|
||||||
package org.eu.exodus_privacy.exodusprivacy.fragments;
|
package org.eu.exodus_privacy.exodusprivacy.fragments;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.databinding.DataBindingUtil;
|
import android.databinding.DataBindingUtil;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.ProgressBar;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import org.eu.exodus_privacy.exodusprivacy.R;
|
import org.eu.exodus_privacy.exodusprivacy.R;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.adapters.ApplicationListAdapter;
|
import org.eu.exodus_privacy.exodusprivacy.adapters.ApplicationListAdapter;
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
|
|
||||||
package org.eu.exodus_privacy.exodusprivacy.fragments;
|
package org.eu.exodus_privacy.exodusprivacy.fragments;
|
||||||
|
|
||||||
import android.app.Fragment;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PermissionInfo;
|
import android.content.pm.PermissionInfo;
|
||||||
import android.databinding.DataBindingUtil;
|
import android.databinding.DataBindingUtil;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set>
|
||||||
|
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fromXDelta="-100%"
|
||||||
|
android:toXDelta="0%"
|
||||||
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
|
android:duration="500"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set>
|
||||||
|
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fromXDelta="100%"
|
||||||
|
android:toXDelta="0"
|
||||||
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
|
android:duration="500"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set>
|
||||||
|
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fromXDelta="0%"
|
||||||
|
android:toXDelta="100%"
|
||||||
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
|
android:duration="500"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set>
|
||||||
|
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fromXDelta="0%"
|
||||||
|
android:toXDelta="-100%"
|
||||||
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
|
android:duration="500"/>
|
||||||
|
</set>
|
Loading…
Reference in New Issue