Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1877c30de9
6 changed files with 22 additions and 9 deletions
|
@ -9,6 +9,9 @@ import net.osmand.plus.OsmandApplication;
|
||||||
public class DashBaseFragment extends SherlockFragment {
|
public class DashBaseFragment extends SherlockFragment {
|
||||||
|
|
||||||
public OsmandApplication getMyApplication(){
|
public OsmandApplication getMyApplication(){
|
||||||
|
if (getActivity() == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (OsmandApplication) getActivity().getApplication();
|
return (OsmandApplication) getActivity().getApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,8 @@ public class DashDownloadMapsFragment extends DashBaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateCount(String s) {
|
protected void updateCount(String s) {
|
||||||
if (!DashDownloadMapsFragment.this.isAdded()){
|
if (!DashDownloadMapsFragment.this.isAdded() ||
|
||||||
|
getMyApplication() == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
File ms = getMyApplication().getAppPath(s);
|
File ms = getMyApplication().getAppPath(s);
|
||||||
|
@ -104,7 +105,8 @@ public class DashDownloadMapsFragment extends DashBaseFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Void result) {
|
protected void onPostExecute(Void result) {
|
||||||
super.onPostExecute(result);
|
super.onPostExecute(result);
|
||||||
if (!DashDownloadMapsFragment.this.isAdded()){
|
if (!DashDownloadMapsFragment.this.isAdded()
|
||||||
|
|| getMyApplication() == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(countMaps > 0) {
|
if(countMaps > 0) {
|
||||||
|
|
|
@ -78,10 +78,16 @@ public class DashMapFragment extends DashBaseFragment implements IMapDownloaderC
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Bitmap image = getMyApplication().getResourceManager().getRenderer().getBitmap();
|
final Bitmap image = getMyApplication().getResourceManager().getRenderer().getBitmap();
|
||||||
ImageView map = (ImageView) view.findViewById(R.id.map_image);
|
final ImageView map = (ImageView) view.findViewById(R.id.map_image);
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
map.setImageBitmap(image);
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
map.setImageBitmap(image);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,9 +143,10 @@ public class DashUpdatesFragment extends DashBaseFragment {
|
||||||
//needed when rotation is performed and progress can be null
|
//needed when rotation is performed and progress can be null
|
||||||
if (!updateOnlyProgress) {
|
if (!updateOnlyProgress) {
|
||||||
getProgressIfPossible(basicProgressAsyncTask.getDescription());
|
getProgressIfPossible(basicProgressAsyncTask.getDescription());
|
||||||
if (currentProgress == null) {
|
}
|
||||||
return;
|
|
||||||
}
|
if (currentProgress == null) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updateOnlyProgress) {
|
if (updateOnlyProgress) {
|
||||||
|
|
|
@ -841,6 +841,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
|
expandAllGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelFilter(){
|
public void cancelFilter(){
|
||||||
|
|
|
@ -333,7 +333,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) {
|
public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) {
|
||||||
helper.item(R.string.osmo_groups).icons(R.drawable.ic_action_eye_dark, R.drawable.ic_action_eye_light).position(6)
|
helper.item(R.string.osmo_groups).icons(R.drawable.ic_osmo_dark, R.drawable.ic_osmo_light).position(6)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
|
Loading…
Reference in a new issue