Renamed activity and created empty fragment for reports.
This commit is contained in:
parent
7518f88a48
commit
3e0e7375e2
7 changed files with 61 additions and 18 deletions
|
@ -289,7 +289,7 @@
|
|||
<action android:name="android.app.action.DEVICE_ADMIN_DISABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<activity android:name=".liveupdates.LiveUpdatesActivity"
|
||||
<activity android:name=".liveupdates.OsmLiveActivity"
|
||||
android:label="@string/osm_live"/>
|
||||
<receiver android:name="net.osmand.plus.liveupdates.LiveUpdatesAlarmReceiver"/>
|
||||
</application>
|
||||
|
|
12
OsmAnd/res/layout/fragment_reports.xml
Normal file
12
OsmAnd/res/layout/fragment_reports.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="net.osmand.plus.liveupdates.ReportsFragment">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment"/>
|
||||
|
||||
</FrameLayout>
|
|
@ -44,7 +44,7 @@ import net.osmand.plus.activities.search.SearchActivity;
|
|||
import net.osmand.plus.dashboard.DashboardOnMap.DashboardType;
|
||||
import net.osmand.plus.dialogs.FavoriteDialogs;
|
||||
import net.osmand.plus.download.IndexItem;
|
||||
import net.osmand.plus.liveupdates.LiveUpdatesActivity;
|
||||
import net.osmand.plus.liveupdates.OsmLiveActivity;
|
||||
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.views.BaseMapLayer;
|
||||
|
@ -670,7 +670,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
.listen(new OnContextMenuClick() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||
Intent intent = new Intent(mapActivity, LiveUpdatesActivity.class);
|
||||
Intent intent = new Intent(mapActivity, OsmLiveActivity.class);
|
||||
mapActivity.startActivity(intent);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ import net.osmand.plus.download.DownloadIndexesThread;
|
|||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
public class LiveUpdatesActivity extends AbstractDownloadActivity
|
||||
public class OsmLiveActivity extends AbstractDownloadActivity
|
||||
implements DownloadIndexesThread.DownloadEvents{
|
||||
private final static Log LOG = PlatformUtil.getLog(LiveUpdatesActivity.class);
|
||||
private final static Log LOG = PlatformUtil.getLog(OsmLiveActivity.class);
|
||||
private LiveUpdatesFragmentPagerAdapter pagerAdapter;
|
||||
|
||||
@Override
|
||||
|
@ -62,8 +62,10 @@ public class LiveUpdatesActivity extends AbstractDownloadActivity
|
|||
}
|
||||
|
||||
public static class LiveUpdatesFragmentPagerAdapter extends FragmentPagerAdapter {
|
||||
private final Fragment[] fragments = new Fragment[]{new LiveUpdatesFragment()};
|
||||
private final String[] titles = new String[]{LiveUpdatesFragment.TITILE};
|
||||
private final Fragment[] fragments = new Fragment[]{new LiveUpdatesFragment(),
|
||||
new ReportsFragment()};
|
||||
private final String[] titles = new String[]{LiveUpdatesFragment.TITILE,
|
||||
LiveUpdatesFragment.TITILE};
|
||||
|
||||
public LiveUpdatesFragmentPagerAdapter(FragmentManager fm) {
|
||||
super(fm);
|
28
OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
Normal file
28
OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package net.osmand.plus.liveupdates;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Activities that contain this fragment must implement the
|
||||
* {@link ReportsFragment.OnFragmentInteractionListener} interface
|
||||
* to handle interaction events.
|
||||
* Use the {@link ReportsFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class ReportsFragment extends Fragment {
|
||||
public static final String TITLE = "Report";
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_reports, container, false);
|
||||
}
|
||||
}
|
|
@ -1,17 +1,18 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||
|
||||
private static final int DATABASE_VERSION = 4;
|
||||
|
|
Loading…
Reference in a new issue