Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
927ce1a4e2
5 changed files with 38 additions and 4 deletions
|
@ -168,7 +168,8 @@ public class MapPoiTypes {
|
|||
|
||||
public Map<String, PoiType> getAllTranslatedNames(boolean skipNonEditable) {
|
||||
Map<String, PoiType> translation = new HashMap<String, PoiType>();
|
||||
for (PoiCategory pc : categories) {
|
||||
for (int i = 0; i < categories.size(); i++) {
|
||||
PoiCategory pc = categories.get(i);
|
||||
if (skipNonEditable && pc.isNotEditableOsm()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
android:id="@+id/map_quick_actions_button"
|
||||
android:layout_width="@dimen/map_button_size"
|
||||
android:layout_height="@dimen/map_button_size"
|
||||
android:background="@drawable/btn_circle_blue"
|
||||
android:contentDescription="@string/configure_screen_quick_action"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:visibility="gone"
|
||||
|
|
|
@ -38,7 +38,7 @@ public class AudioVideoNoteRecordingMenuFullScreenFragment extends Fragment {
|
|||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (!dismissing) {
|
||||
if (!dismissing && menu != null) {
|
||||
menu.finishRecording();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ import android.view.MenuInflater;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
|
@ -329,6 +331,22 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
listView.setAdapter(this.adapter);
|
||||
}
|
||||
|
||||
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrollStateChanged(AbsListView absListView, int i) {
|
||||
View currentFocus = getActivity().getCurrentFocus();
|
||||
if (currentFocus != null) {
|
||||
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScroll(AbsListView absListView, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.views;
|
|||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Vibrator;
|
||||
import android.support.annotation.DimenRes;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
|
@ -73,7 +74,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
|
|||
quickActionButton = (ImageButton) mapActivity.findViewById(R.id.map_quick_actions_button);
|
||||
setQuickActionButtonMargin();
|
||||
isLayerOn = quickActionRegistry.isQuickActionOn();
|
||||
quickActionButton.setImageResource(R.drawable.map_quick_action);
|
||||
setUpQuickActionBtnResources(app.getDaynightHelper().isNightModeForMapControls());
|
||||
quickActionButton.setContentDescription(mapActivity.getString(R.string.configure_screen_quick_action));
|
||||
quickActionButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -293,6 +294,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
|
|||
contextMarker.draw(canvas);
|
||||
}
|
||||
setUpQuickActionBtnVisibility();
|
||||
setUpQuickActionBtnResources(settings.isNightMode());
|
||||
}
|
||||
|
||||
private void setUpQuickActionBtnVisibility() {
|
||||
|
@ -306,6 +308,20 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
|
|||
quickActionButton.setVisibility(hideQuickButton ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
private void setUpQuickActionBtnResources(boolean nightMode) {
|
||||
Drawable icon;
|
||||
int backgroundId;
|
||||
if (nightMode) {
|
||||
backgroundId = R.drawable.btn_circle_night;
|
||||
icon = app.getIconsCache().getIcon(R.drawable.map_quick_action, 0);
|
||||
} else {
|
||||
backgroundId = R.drawable.btn_circle_trans;
|
||||
icon = app.getIconsCache().getIcon(R.drawable.map_quick_action, R.color.icon_color);
|
||||
}
|
||||
quickActionButton.setBackgroundResource(backgroundId);
|
||||
quickActionButton.setImageDrawable(icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyLayer() {
|
||||
|
||||
|
|
Loading…
Reference in a new issue