Ich habe Problem: Auf meiner Haupttätigkeit habe ich andere Aktivität mit Floating-Aktion-Taste gestartet. In der Absicht habe ich den Übergang von gemeinsam genutzten Elementen gesendet. Alles ist gut, außer dass AppBar Fab überlappt. Es scheint, dass das Verhalten von AppBar geändert wurde. Bitte sag mir, wo ich suchen soll?AppBar Layout überlappende Floating Action Button nach dem Übergang
Teil der Hauptaktivität, in dem gemeinsam genutzten Element Übergang initialisiert wird:
case R.id.start_page_fab:
intent = AddTransactionActivity.newIntent(this, CATEGORY_LIST);
Pair<View, String> p1 = Pair.create(findViewById(R.id.appcollapse), "start_page_transition");
Pair<View, String> p4 = Pair.create(findViewById(R.id.start_credit_card), "start_page_transition");
Pair<View, String> p2 = Pair.create(findViewById(R.id.start_page_fab),"start_page_transition");
ActivityOptionsCompat options = ActivityOptionsCompat
.makeSceneTransitionAnimation(this,p1,p4,p2);
startActivity(intent,options.toBundle());
break;
Verfahren setupEnterAnimation in anderen Aktivität, whitch abfängt transition:
private void setupEnterAnimation() {
Transition transition = TransitionInflater.from(getContext()).inflateTransition(R.transition.start_page_trancition);
transition.setDuration(500);
getActivity().getWindow().setSharedElementEnterTransition(transition);
}
Teil-Layout mit AppBar
<android.support.design.widget.CoordinatorLayout
android:id="@+id/start_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="ru.berezin.maxim.im.budget_v3.userinterface.StartPage">
<android.support.design.widget.AppBarLayout
android:id="@+id/appcollapse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:transitionName="start_page_transition">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/main_collapsing"
android:layout_width="match_parent"
android:layout_height="280dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
>
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/start_chart"
android:layout_width="match_parent"
android:layout_height="260dp"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="1.3"/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
...
Und ein anderes Layout:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/add_tran_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<android.support.design.widget.AppBarLayout
android:id="@+id/appcollapse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:transitionName="start_page_transition">
<Switch
android:id="@+id/transaction_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:text="@string/credit"
/>
<android.support.design.widget.TextInputLayout
android:id="@+id/transaction_photo_sum_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="16dp"
android:paddingStart="16dp"
>
<EditText
android:id="@+id/transaction_sum"
android:layout_width="285dp"
android:layout_height="wrap_content"
android:hint="@string/transaction_sum_hint"
android:inputType="numberDecimal"
android:maxLength="10"
android:textSize="34sp"/>
</android.support.design.widget.TextInputLayout>
</android.support.design.widget.AppBarLayout>
.....