forked from organicmaps/organicmaps
Renamed fragments & added statistics to list fragments.
This commit is contained in:
parent
94b1204bba
commit
482734f8d0
19 changed files with 47 additions and 55 deletions
|
@ -4,10 +4,10 @@ import android.os.Bundle;
|
|||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
|
||||
public class DownloadActivity extends MWMFragmentActivity
|
||||
public class DownloadActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
private DownloadFragment mDownloadFragment;
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ import android.widget.TextView;
|
|||
|
||||
import com.mapswithme.maps.MWMActivity;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMListFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmListFragment;
|
||||
import com.mapswithme.maps.base.OnBackPressListener;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
|
||||
public class DownloadFragment extends MWMListFragment implements View.OnClickListener, ActiveCountryTree.ActiveCountryListener, OnBackPressListener
|
||||
public class DownloadFragment extends BaseMwmListFragment implements View.OnClickListener, ActiveCountryTree.ActiveCountryListener, OnBackPressListener
|
||||
{
|
||||
private ExtendedDownloadAdapterWrapper mExtendedAdapter;
|
||||
private DownloadedAdapter mDownloadedAdapter;
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.mapswithme.maps.MWMActivity.OpenUrlTask;
|
|||
import com.mapswithme.maps.MapStorage.Index;
|
||||
import com.mapswithme.maps.api.Const;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
import com.mapswithme.maps.location.LocationHelper;
|
||||
import com.mapswithme.util.ConnectionState;
|
||||
import com.mapswithme.util.Constants;
|
||||
|
@ -35,7 +35,7 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
|
||||
@SuppressLint("StringFormatMatches")
|
||||
public class DownloadResourcesActivity extends MWMFragmentActivity
|
||||
public class DownloadResourcesActivity extends BaseMwmFragmentActivity
|
||||
implements LocationHelper.LocationListener, MapStorage.Listener
|
||||
{
|
||||
private static final String TAG = DownloadResourcesActivity.class.getName();
|
||||
|
|
|
@ -46,7 +46,7 @@ import com.mapswithme.maps.Framework.OnBalloonListener;
|
|||
import com.mapswithme.maps.MapStorage.Index;
|
||||
import com.mapswithme.maps.ads.LikesManager;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
import com.mapswithme.maps.bookmarks.BookmarkActivity;
|
||||
import com.mapswithme.maps.bookmarks.BookmarkCategoriesActivity;
|
||||
import com.mapswithme.maps.bookmarks.data.Bookmark;
|
||||
|
@ -84,7 +84,7 @@ import java.io.Serializable;
|
|||
import java.util.Stack;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class MWMActivity extends MWMFragmentActivity
|
||||
public class MWMActivity extends BaseMwmFragmentActivity
|
||||
implements LocationHelper.LocationListener, OnBalloonListener, View.OnTouchListener, BasePlacePageAnimationController.OnVisibilityChangedListener,
|
||||
OnClickListener, Framework.RoutingListener, MapFragment.MapRenderingListener
|
||||
{
|
||||
|
|
|
@ -1,28 +1,9 @@
|
|||
package com.mapswithme.maps.base;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
public class MWMFragment extends Fragment
|
||||
public class BaseMwmFragment extends Fragment
|
||||
{
|
||||
@Override
|
||||
public void onCreate(Bundle arg0)
|
||||
{
|
||||
super.onCreate(arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop()
|
||||
{
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume()
|
||||
{
|
|
@ -13,7 +13,7 @@ import com.mapswithme.util.statistics.Statistics;
|
|||
|
||||
import ru.mail.mrgservice.MRGService;
|
||||
|
||||
public class MWMFragmentActivity extends ActionBarActivity
|
||||
public class BaseMwmFragmentActivity extends ActionBarActivity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle arg0)
|
|
@ -8,7 +8,7 @@ import android.view.View;
|
|||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
|
||||
public abstract class MWMListFragment extends ListFragment
|
||||
public abstract class BaseMwmListFragment extends ListFragment
|
||||
{
|
||||
private Toolbar mToolbar;
|
||||
|
||||
|
@ -27,5 +27,16 @@ public abstract class MWMListFragment extends ListFragment
|
|||
return mToolbar;
|
||||
}
|
||||
|
||||
// TODO collect some statistics
|
||||
public void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
org.alohalytics.Statistics.logEvent("$onResume", this.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause()
|
||||
{
|
||||
super.onPause();
|
||||
org.alohalytics.Statistics.logEvent("$onPause", this.getClass().getSimpleName());
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ import android.widget.EditText;
|
|||
import android.widget.TextView;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
import com.mapswithme.maps.bookmarks.data.Bookmark;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
import com.mapswithme.maps.bookmarks.data.Icon;
|
||||
|
@ -23,7 +23,7 @@ import com.mapswithme.util.UiUtils;
|
|||
import com.mapswithme.util.Utils;
|
||||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
||||
public class BookmarkActivity extends MWMFragmentActivity
|
||||
public class BookmarkActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
public static final String BOOKMARK_POSITION = "bookmark_position";
|
||||
public static final String PIN = "pin";
|
||||
|
|
|
@ -5,9 +5,9 @@ import android.support.v4.app.Fragment;
|
|||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
public class BookmarkCategoriesActivity extends MWMFragmentActivity
|
||||
public class BookmarkCategoriesActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
|
|
|
@ -11,10 +11,10 @@ import android.widget.AdapterView;
|
|||
import android.widget.ListView;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMListFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmListFragment;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
|
||||
public class BookmarkCategoriesFragment extends MWMListFragment
|
||||
public class BookmarkCategoriesFragment extends BaseMwmListFragment
|
||||
{
|
||||
private int mSelectedPosition;
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ import android.os.Bundle;
|
|||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
|
||||
public class BookmarkListActivity extends MWMFragmentActivity
|
||||
public class BookmarkListActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.mapswithme.maps.Framework;
|
|||
import com.mapswithme.maps.MWMActivity;
|
||||
import com.mapswithme.maps.MWMApplication;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMListFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmListFragment;
|
||||
import com.mapswithme.maps.bookmarks.data.Bookmark;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkCategory;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
|
@ -32,7 +32,7 @@ import com.mapswithme.maps.bookmarks.data.ParcelablePoint;
|
|||
import com.mapswithme.maps.bookmarks.data.Track;
|
||||
import com.mapswithme.util.ShareAction;
|
||||
|
||||
public class BookmarksListFragment extends MWMListFragment
|
||||
public class BookmarksListFragment extends BaseMwmListFragment
|
||||
{
|
||||
public static final String TAG = "BookmarkListActivity";
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import android.os.Bundle;
|
|||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
public class ChooseBookmarkCategoryActivity extends MWMFragmentActivity
|
||||
public class ChooseBookmarkCategoryActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle arg0)
|
||||
|
|
|
@ -15,13 +15,13 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMListFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmListFragment;
|
||||
import com.mapswithme.maps.bookmarks.data.Bookmark;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
import com.mapswithme.maps.bookmarks.data.ParcelablePoint;
|
||||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
||||
public class ChooseBookmarkCategoryFragment extends MWMListFragment
|
||||
public class ChooseBookmarkCategoryFragment extends BaseMwmListFragment
|
||||
{
|
||||
private FooterHelper mFooterHelper;
|
||||
private ChooseBookmarkCategoryAdapter mAdapter;
|
||||
|
|
|
@ -6,10 +6,10 @@ import android.os.Bundle;
|
|||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
|
||||
public class SearchActivity extends MWMFragmentActivity
|
||||
public class SearchActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
public static final String EXTRA_QUERY = "search_query";
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import android.widget.TextView;
|
|||
|
||||
import com.mapswithme.maps.MWMActivity;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMListFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmListFragment;
|
||||
import com.mapswithme.maps.base.OnBackPressListener;
|
||||
import com.mapswithme.maps.location.LocationHelper;
|
||||
import com.mapswithme.util.InputUtils;
|
||||
|
@ -30,7 +30,7 @@ import com.mapswithme.util.Utils;
|
|||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
||||
|
||||
public class SearchFragment extends MWMListFragment implements View.OnClickListener, LocationHelper.LocationListener, OnBackPressListener
|
||||
public class SearchFragment extends BaseMwmListFragment implements View.OnClickListener, LocationHelper.LocationListener, OnBackPressListener
|
||||
{
|
||||
// These constants should be equal with
|
||||
// Java_com_mapswithme_maps_SearchActivity_nativeRunSearch routine.
|
||||
|
|
|
@ -5,9 +5,9 @@ import android.support.v4.app.Fragment;
|
|||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMFragmentActivity;
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
public class StoragePathActivity extends MWMFragmentActivity
|
||||
public class StoragePathActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
|
|
|
@ -6,9 +6,9 @@ import android.content.Intent;
|
|||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.mapswithme.maps.base.MWMListFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmListFragment;
|
||||
|
||||
public class StoragePathFragment extends MWMListFragment implements StoragePathManager.SetStoragePathListener
|
||||
public class StoragePathFragment extends BaseMwmListFragment implements StoragePathManager.SetStoragePathListener
|
||||
{
|
||||
private StoragePathManager mPathManager = new StoragePathManager();
|
||||
private StoragePathAdapter mAdapter;
|
||||
|
|
|
@ -14,11 +14,11 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.MWMFragment;
|
||||
import com.mapswithme.maps.base.BaseMwmFragment;
|
||||
import com.mapswithme.util.log.Logger;
|
||||
import com.mapswithme.util.log.StubLogger;
|
||||
|
||||
public abstract class NvEventQueueFragment extends MWMFragment implements View.OnTouchListener, View.OnFocusChangeListener
|
||||
public abstract class NvEventQueueFragment extends BaseMwmFragment implements View.OnTouchListener, View.OnFocusChangeListener
|
||||
{
|
||||
private static final String TAG = NvEventQueueFragment.class.getSimpleName();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue