blob: 91fcf4f00b1dd85a0be8d3a59305bde9d1722d6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
package com.mapswithme.maps.base;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.ListFragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import com.mapswithme.maps.MwmApplication;
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;
@Override
public void onAttach(Context context)
{
super.onAttach(context);
Utils.detachFragmentIfInitializing(context, this);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
mToolbar = (Toolbar) view.findViewById(R.id.toolbar);
if (mToolbar != null)
{
UiUtils.showHomeUpButton(mToolbar);
mToolbar.setNavigationOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Utils.navigateToParent(getActivity());
}
});
}
}
public Toolbar getToolbar()
{
return mToolbar;
}
@Override
public void onResume()
{
super.onResume();
org.alohalytics.Statistics.logEvent("$onResume", getClass().getSimpleName() + ":" +
UiUtils.deviceOrientationAsString(getActivity()));
}
@Override
public void onPause()
{
super.onPause();
org.alohalytics.Statistics.logEvent("$onPause", getClass().getSimpleName());
}
}
|