Update card
This commit is contained in:
parent
b1f42ae0fc
commit
d8fff2a364
4 changed files with 19 additions and 10 deletions
|
@ -12,8 +12,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"
|
||||
android:focusable="false"
|
||||
android:visibility="gone" />
|
||||
android:focusable="false"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -26,7 +25,9 @@
|
|||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_start_navigation" />
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:src="@drawable/ic_action_start_navigation"
|
||||
android:layout_marginRight="@dimen/favorites_icon_right_margin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
|
|
|
@ -702,7 +702,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
mapActivity.updateApplicationModeSettings();
|
||||
}
|
||||
|
||||
public void stopNavigationActionConfirm() {
|
||||
public AlertDialog stopNavigationActionConfirm() {
|
||||
Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
// Stop the navigation
|
||||
builder.setTitle(getString(R.string.cancel_route));
|
||||
|
@ -714,7 +714,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.shared_string_no, null);
|
||||
builder.show();
|
||||
return builder.show();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.ShowRouteInfoActivity;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -78,7 +79,14 @@ public class DashNavigationFragment extends DashBaseFragment {
|
|||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
map.getMapActions().stopNavigationActionConfirm();
|
||||
AlertDialog dlg = map.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
setupNavigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
int nav;
|
||||
|
|
|
@ -836,12 +836,12 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
|
|||
|
||||
@SuppressLint("NewApi")
|
||||
private void setAlpha(View v, int alpha, int clr) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
v.setAlpha(alpha/255.f);
|
||||
} else {
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
// v.setAlpha(alpha/255.f);
|
||||
// } else {
|
||||
int colr = (((int) alpha ) << 24) | clr;
|
||||
v.setBackgroundColor(colr);
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue