mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Merge pull request #562 from neslihanturan/optimisingNearby
Optimising nearby
This commit is contained in:
commit
500490f6a9
9 changed files with 235 additions and 161 deletions
|
|
@ -1,35 +1,58 @@
|
|||
package fr.free.nrw.commons.nearby;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.location.LocationServiceManager;
|
||||
import fr.free.nrw.commons.theme.BaseActivity;
|
||||
import fr.free.nrw.commons.utils.UriSerializer;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NearbyActivity extends BaseActivity {
|
||||
@BindView(R.id.progressBar)
|
||||
ProgressBar progressBar;
|
||||
private boolean isMapViewActive = false;
|
||||
|
||||
private LocationServiceManager locationManager;
|
||||
private LatLng curLatLang;
|
||||
private Gson gson;
|
||||
private String gsonPlaceList;
|
||||
private String gsonCurLatLng;
|
||||
private Bundle bundle;
|
||||
private NearbyAsyncTask nearbyAsyncTask;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_nearby);
|
||||
ButterKnife.bind(this);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
bundle = new Bundle();
|
||||
locationManager = new LocationServiceManager(this);
|
||||
locationManager.registerLocationManager();
|
||||
curLatLang = locationManager.getLatestLocation();
|
||||
nearbyAsyncTask = new NearbyAsyncTask();
|
||||
nearbyAsyncTask.execute();
|
||||
|
||||
// Begin the transaction
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
NearbyListFragment fragment = new NearbyListFragment();
|
||||
ft.add(R.id.container, fragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -56,9 +79,10 @@ public class NearbyActivity extends BaseActivity {
|
|||
|
||||
private void showMapView() {
|
||||
if (!isMapViewActive) {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new NearbyMapFragment()).commit();
|
||||
isMapViewActive = true;
|
||||
if (nearbyAsyncTask.getStatus() == AsyncTask.Status.FINISHED) {
|
||||
setMapFragment();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -68,13 +92,8 @@ public class NearbyActivity extends BaseActivity {
|
|||
}
|
||||
|
||||
protected void refreshView() {
|
||||
if (isMapViewActive) {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new NearbyMapFragment()).commit();
|
||||
} else {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new NearbyListFragment()).commit();
|
||||
}
|
||||
nearbyAsyncTask = new NearbyAsyncTask();
|
||||
nearbyAsyncTask.execute();
|
||||
}
|
||||
|
||||
public LocationServiceManager getLocationManager() {
|
||||
|
|
@ -86,4 +105,77 @@ public class NearbyActivity extends BaseActivity {
|
|||
super.onDestroy();
|
||||
locationManager.unregisterLocationManager();
|
||||
}
|
||||
|
||||
private class NearbyAsyncTask extends AsyncTask<Void, Integer, List<Place>> {
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
super.onPreExecute();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onProgressUpdate(Integer... values) {
|
||||
super.onProgressUpdate(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Place> doInBackground(Void... params) {
|
||||
return NearbyController
|
||||
.loadAttractionsFromLocation(curLatLang, getApplicationContext()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(List<Place> placeList) {
|
||||
super.onPostExecute(placeList);
|
||||
|
||||
if (isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Uri.class, new UriSerializer())
|
||||
.create();
|
||||
gsonPlaceList = gson.toJson(placeList);
|
||||
gsonCurLatLng = gson.toJson(curLatLang);
|
||||
|
||||
bundle.clear();
|
||||
bundle.putString("PlaceList", gsonPlaceList);
|
||||
bundle.putString("CurLatLng", gsonCurLatLng);
|
||||
|
||||
// Begin the transaction
|
||||
if (isMapViewActive) {
|
||||
setMapFragment();
|
||||
} else {
|
||||
setListFragment();
|
||||
}
|
||||
|
||||
if (progressBar != null) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls fragment for map view.
|
||||
*/
|
||||
public void setMapFragment() {
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
NearbyMapFragment fragment = new NearbyMapFragment();
|
||||
fragment.setArguments(bundle);
|
||||
ft.add(R.id.container, fragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls fragment for list view.
|
||||
*/
|
||||
public void setListFragment() {
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
NearbyListFragment fragment = new NearbyListFragment();
|
||||
fragment.setArguments(bundle);
|
||||
ft.add(R.id.container, fragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,13 @@ import timber.log.Timber;
|
|||
public class NearbyController {
|
||||
private static final int MAX_RESULTS = 1000;
|
||||
|
||||
private static List<Place> loadAttractionsFromLocation(LatLng curLatLng, Context context) {
|
||||
/**
|
||||
* Prepares Place list to make their distance information update later.
|
||||
* @param curLatLng current location for user
|
||||
* @param context context
|
||||
* @return Place list without distance information
|
||||
*/
|
||||
public static List<Place> loadAttractionsFromLocation(LatLng curLatLng, Context context) {
|
||||
Timber.d("Loading attractions near %s", curLatLng);
|
||||
if (curLatLng == null) {
|
||||
return Collections.emptyList();
|
||||
|
|
@ -59,35 +65,32 @@ public class NearbyController {
|
|||
/**
|
||||
* Loads attractions from location for list view, we need to return Place data type.
|
||||
* @param curLatLng users current location
|
||||
* @param context current activity
|
||||
* @param placeList list of nearby places in Place data type
|
||||
* @return Place list that holds nearby places
|
||||
*/
|
||||
|
||||
public static List<Place> loadAttractionsFromLocationToPlaces(LatLng curLatLng,
|
||||
Context context) {
|
||||
|
||||
List<Place> places = loadAttractionsFromLocation(curLatLng,context);
|
||||
places = places.subList(0, Math.min(places.size(), MAX_RESULTS));
|
||||
for (Place place: places) {
|
||||
public static List<Place> loadAttractionsFromLocationToPlaces(
|
||||
LatLng curLatLng,
|
||||
List<Place> placeList) {
|
||||
placeList = placeList.subList(0, Math.min(placeList.size(), MAX_RESULTS));
|
||||
for (Place place: placeList) {
|
||||
String distance = formatDistanceBetween(curLatLng, place.location);
|
||||
place.setDistance(distance);
|
||||
}
|
||||
return places;
|
||||
return placeList;
|
||||
}
|
||||
|
||||
/**
|
||||
*Loads attractions from location for map view, we need to return BaseMarkerOption data type.
|
||||
* @param curLatLng users current location
|
||||
* @param context the activity
|
||||
* @param placeList list of nearby places in Place data type
|
||||
* @return BaseMarkerOprions list that holds nearby places
|
||||
*/
|
||||
public static List<BaseMarkerOptions> loadAttractionsFromLocationToBaseMarkerOptions(
|
||||
LatLng curLatLng,
|
||||
Context context) {
|
||||
List<Place> placeList) {
|
||||
List<BaseMarkerOptions> baseMarkerOptionses = new ArrayList<>();
|
||||
List<Place> places = loadAttractionsFromLocation(curLatLng,context);
|
||||
places = places.subList(0, Math.min(places.size(), MAX_RESULTS));
|
||||
for (Place place: places) {
|
||||
placeList = placeList.subList(0, Math.min(placeList.size(), MAX_RESULTS));
|
||||
for (Place place: placeList) {
|
||||
String distance = formatDistanceBetween(curLatLng, place.location);
|
||||
place.setDistance(distance);
|
||||
baseMarkerOptionses.add(new MarkerOptions()
|
||||
|
|
|
|||
|
|
@ -2,30 +2,40 @@ package fr.free.nrw.commons.nearby;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnItemClick;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.utils.UriDeserializer;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import timber.log.Timber;
|
||||
|
||||
public class NearbyListFragment extends ListFragment {
|
||||
|
||||
private NearbyAsyncTask nearbyAsyncTask;
|
||||
//private NearbyAsyncTask nearbyAsyncTask;
|
||||
private Gson gson;
|
||||
private List<Place> placeList;
|
||||
private LatLng curLatLng;
|
||||
|
||||
@BindView(R.id.listView) ListView listview;
|
||||
@BindView(R.id.progressBar) ProgressBar progressBar;
|
||||
|
||||
|
||||
private NearbyAdapter adapter;
|
||||
|
||||
|
|
@ -55,86 +65,28 @@ public class NearbyListFragment extends ListFragment {
|
|||
|
||||
// Check that this is the first time view is created,
|
||||
// to avoid double list when screen orientation changed
|
||||
Bundle bundle = this.getArguments();
|
||||
gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Uri.class, new UriDeserializer())
|
||||
.create();
|
||||
if (bundle != null) {
|
||||
String gsonPlaceList = bundle.getString("PlaceList");
|
||||
String gsonLatLng = bundle.getString("CurLatLng");
|
||||
Type listType = new TypeToken<List<Place>>() {}.getType();
|
||||
placeList = gson.fromJson(gsonPlaceList, listType);
|
||||
Type curLatLngType = new TypeToken<LatLng>() {}.getType();
|
||||
curLatLng = gson.fromJson(gsonLatLng, curLatLngType);
|
||||
placeList = NearbyController.loadAttractionsFromLocationToPlaces(curLatLng, placeList);
|
||||
}
|
||||
if (savedInstanceState == null) {
|
||||
adapter.clear();
|
||||
nearbyAsyncTask = new NearbyAsyncTask();
|
||||
nearbyAsyncTask.execute();
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
Timber.d("Saved instance state is null, populating ListView");
|
||||
} else {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// If we are returning here from a screen orientation and the AsyncTask is still working,
|
||||
// re-create and display the progress dialog.
|
||||
if (isTaskRunning()) {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isTaskRunning() {
|
||||
return nearbyAsyncTask != null && nearbyAsyncTask.getStatus() != AsyncTask.Status.FINISHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
// All dialogs should be closed before leaving the activity in order to avoid
|
||||
// the: Activity has leaked window com.android.internal.policy... exception
|
||||
if (progressBar != null && progressBar.isShown()) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
super.onDetach();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
// See http://stackoverflow.com/questions/18264408/incomplete-asynctask-crashes-my-app
|
||||
if (isTaskRunning()) {
|
||||
nearbyAsyncTask.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
private class NearbyAsyncTask extends AsyncTask<Void, Integer, List<Place>> {
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
super.onPreExecute();
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onProgressUpdate(Integer... values) {
|
||||
super.onProgressUpdate(values);
|
||||
progressBar.setProgress(values[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Place> doInBackground(Void... params) {
|
||||
return NearbyController.loadAttractionsFromLocationToPlaces(
|
||||
((NearbyActivity)getActivity())
|
||||
.getLocationManager()
|
||||
.getLatestLocation(), getActivity()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(List<Place> places) {
|
||||
super.onPostExecute(places);
|
||||
|
||||
if (isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (progressBar != null) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
adapter.clear();
|
||||
adapter.addAll(places);
|
||||
adapter.addAll(placeList);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@OnItemClick(R.id.listView)
|
||||
void onItemClicked(int position) {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
package fr.free.nrw.commons.nearby;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.mapbox.mapboxsdk.Mapbox;
|
||||
import com.mapbox.mapboxsdk.annotations.BaseMarkerOptions;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
|
|
@ -18,14 +21,19 @@ import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
|
|||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.services.android.telemetry.MapboxTelemetry;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.utils.UriDeserializer;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
|
||||
public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
||||
private NearbyAsyncTask nearbyAsyncTask;
|
||||
private fr.free.nrw.commons.location.LatLng currentLocation;
|
||||
//private NearbyAsyncTask nearbyAsyncTask;
|
||||
private MapView mapView;
|
||||
private Gson gson;
|
||||
private List<Place> placeList;
|
||||
private List<BaseMarkerOptions> baseMarkerOptionses;
|
||||
private fr.free.nrw.commons.location.LatLng curLatLng;
|
||||
|
||||
public NearbyMapFragment() {
|
||||
|
||||
|
|
@ -34,7 +42,21 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
currentLocation = ((NearbyActivity)getActivity()).getLocationManager().getLatestLocation();
|
||||
Bundle bundle = this.getArguments();
|
||||
gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Uri.class, new UriDeserializer())
|
||||
.create();
|
||||
if (bundle != null) {
|
||||
String gsonPlaceList = bundle.getString("PlaceList");
|
||||
String gsonLatLng = bundle.getString("CurLatLng");
|
||||
Type listType = new TypeToken<List<Place>>() {}.getType();
|
||||
placeList = gson.fromJson(gsonPlaceList, listType);
|
||||
Type curLatLngType = new TypeToken<fr.free.nrw.commons.location.LatLng>() {}.getType();
|
||||
curLatLng = gson.fromJson(gsonLatLng, curLatLngType);
|
||||
baseMarkerOptionses = NearbyController
|
||||
.loadAttractionsFromLocationToBaseMarkerOptions(curLatLng, placeList);
|
||||
|
||||
}
|
||||
Mapbox.getInstance(getActivity(),
|
||||
getString(R.string.mapbox_commons_app_token));
|
||||
MapboxTelemetry.getInstance().setTelemetryEnabled(false);
|
||||
|
|
@ -46,13 +68,19 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
MapboxMapOptions options = new MapboxMapOptions()
|
||||
.styleUrl(Style.OUTDOORS)
|
||||
.camera(new CameraPosition.Builder()
|
||||
.target(new LatLng(currentLocation.latitude, currentLocation.longitude))
|
||||
.target(new LatLng(curLatLng.latitude, curLatLng.longitude))
|
||||
.zoom(11)
|
||||
.build());
|
||||
|
||||
// create map
|
||||
mapView = new MapView(getActivity(), options);
|
||||
mapView.onCreate(savedInstanceState);
|
||||
mapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(MapboxMap mapboxMap) {
|
||||
mapboxMap.addMarkers(baseMarkerOptionses);
|
||||
}
|
||||
});
|
||||
setHasOptionsMenu(false);
|
||||
return mapView;
|
||||
}
|
||||
|
|
@ -60,8 +88,6 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
nearbyAsyncTask = new NearbyAsyncTask();
|
||||
nearbyAsyncTask.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -93,39 +119,4 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
mapView.onDestroy();
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
private class NearbyAsyncTask extends AsyncTask<Void, Integer, List<BaseMarkerOptions>> {
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
super.onPreExecute();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onProgressUpdate(Integer... values) {
|
||||
super.onProgressUpdate(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<BaseMarkerOptions> doInBackground(Void... params) {
|
||||
return NearbyController
|
||||
.loadAttractionsFromLocationToBaseMarkerOptions(currentLocation, getActivity()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(final List<BaseMarkerOptions> baseMarkerOptionses) {
|
||||
super.onPostExecute(baseMarkerOptionses);
|
||||
|
||||
if (isCancelled()) {
|
||||
return;
|
||||
}
|
||||
mapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(MapboxMap mapboxMap) {
|
||||
mapboxMap.addMarkers(baseMarkerOptionses);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public class Place {
|
|||
public Bitmap secondaryImage;
|
||||
public String distance;
|
||||
|
||||
|
||||
public Place(String name, String description, String longDescription,
|
||||
Uri secondaryImageUrl, LatLng location) {
|
||||
this.name = name;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package fr.free.nrw.commons.utils;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonParseException;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
public class UriDeserializer implements JsonDeserializer<Uri> {
|
||||
@Override
|
||||
public Uri deserialize(final JsonElement src, final Type srcType,
|
||||
final JsonDeserializationContext context) throws JsonParseException {
|
||||
return Uri.parse(src.getAsString());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package fr.free.nrw.commons.utils;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
import com.google.gson.JsonSerializationContext;
|
||||
import com.google.gson.JsonSerializer;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
public class UriSerializer implements JsonSerializer<Uri> {
|
||||
public JsonElement serialize(Uri src, Type typeOfSrc, JsonSerializationContext context) {
|
||||
return new JsonPrimitive(src.toString());
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,13 @@
|
|||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@
|
|||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue