forked from organicmaps/organicmaps
[android] Added convenience methods to base fragments.
This commit is contained in:
parent
b973c417d4
commit
8284809e09
4 changed files with 12 additions and 1 deletions
|
@ -18,4 +18,9 @@ public class BaseMwmFragment extends Fragment
|
|||
super.onPause();
|
||||
org.alohalytics.Statistics.logEvent("$onPause", this.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
public BaseMwmFragmentActivity getMwmActivity()
|
||||
{
|
||||
return (BaseMwmFragmentActivity) getActivity();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ public class BaseMwmFragmentActivity extends AppCompatActivity
|
|||
/**
|
||||
* Replace attached fragment with the new one.
|
||||
*/
|
||||
public void replaceFragment(Class<? extends Fragment> fragmentClass, Bundle args, @Nullable Runnable completionListener)
|
||||
public void replaceFragment(Class<? extends Fragment> fragmentClass, @Nullable Bundle args, @Nullable Runnable completionListener)
|
||||
{
|
||||
final int resId = getFragmentContentResId();
|
||||
if (resId <= 0 || findViewById(resId) == null)
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.mapswithme.maps.R;
|
|||
import com.mapswithme.util.UiUtils;
|
||||
import com.mapswithme.util.Utils;
|
||||
|
||||
@Deprecated
|
||||
public abstract class BaseMwmListFragment extends ListFragment
|
||||
{
|
||||
private Toolbar mToolbar;
|
||||
|
|
|
@ -89,4 +89,9 @@ public abstract class BaseMwmRecyclerFragment extends Fragment
|
|||
super.onPause();
|
||||
org.alohalytics.Statistics.logEvent("$onPause", this.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
public BaseMwmFragmentActivity getMwmActivity()
|
||||
{
|
||||
return (BaseMwmFragmentActivity) getActivity();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue