Skip to content

Commit

Permalink
Add screenKey to fragment transaction tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Oct 21, 2020
1 parent b88a699 commit d8ee40c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Expand Up @@ -115,8 +115,8 @@ open class AppNavigator constructor(
fragment
)
when (type) {
ADD -> transaction.add(containerId, fragment)
REPLACE -> transaction.replace(containerId, fragment)
ADD -> transaction.add(containerId, fragment, screen.screenKey)
REPLACE -> transaction.replace(containerId, fragment, screen.screenKey)
}
if (addToBackStack) {
val transactionInfo = TransactionInfo(screen.screenKey, type)
Expand Down
@@ -1,32 +1,16 @@
package androidx.fragment.app;

import android.os.Bundle;

/**
* Created by Konstantin Tskhovrebov (aka @terrakok)
* on 11.10.16
*/

public class FragmentTransaction {
public FragmentTransaction add(int containerViewId, Fragment fragment) {
throw new RuntimeException("Stub!");
}

public final FragmentTransaction add(
int containerViewId,
Class<? extends Fragment> fragmentClass,
Bundle args) {
throw new RuntimeException("Stub!");
}

public FragmentTransaction replace(int containerViewId, Fragment fragment) {
public FragmentTransaction add(int containerViewId, Fragment fragment, String tag) {
throw new RuntimeException("Stub!");
}

public final FragmentTransaction replace(
int containerViewId,
Class<? extends Fragment> fragmentClass,
Bundle args) {
public FragmentTransaction replace(int containerViewId, Fragment fragment, String tag) {
throw new RuntimeException("Stub!");
}

Expand Down

0 comments on commit d8ee40c

Please sign in to comment.