Update plugins
This commit is contained in:
parent
a7c0717867
commit
bef93375e7
5 changed files with 93 additions and 119 deletions
|
@ -1,23 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_fav"
|
||||
android:background="?attr/card_bg"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/dashHeaderHeight">
|
||||
<TextView android:id="@+id/fav_text"
|
||||
android:text="@string/shared_string_my_places"
|
||||
style="?attr/dashboardSubHeaderStyle"/>
|
||||
<Button android:id="@+id/show_all"
|
||||
android:text="@string/shared_string_show_all"
|
||||
style="?attr/dashboardGeneralButtonStyle"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:id="@+id/items"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main_fav"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/card_bg"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/dashHeaderHeight"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fav_text"
|
||||
style="?attr/dashboardSubHeaderStyle"
|
||||
android:text="@string/shared_string_my_places" />
|
||||
|
||||
<net.osmand.plus.widgets.ButtonEx
|
||||
android:id="@+id/show_all"
|
||||
style="?attr/dashboardGeneralButtonStyle"
|
||||
android:text="@string/shared_string_show_all"
|
||||
osmand:textAllCapsCompat="true"
|
||||
osmand:typeface="@string/font_roboto_medium" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/items"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
|
@ -31,6 +31,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:id="@+id/widget_text"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="@dimen/map_widget_text_bottom_margin"
|
||||
|
|
|
@ -1,95 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/expandable_list_item_background"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/card_bg"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:padding="2dp">
|
||||
<ImageButton
|
||||
android:id="@+id/plugin_logo"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/bg_plugin_logo_enabled"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="center"
|
||||
tools:src="@drawable/ic_extension_dark" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/plugin_logo"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/bg_plugin_logo_enabled"
|
||||
android:scaleType="center"
|
||||
tools:src="@drawable/ic_extension_dark"/>
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/plugin_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:text="@string/lorem_ipsum"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="19sp"
|
||||
osmand:typeface="@string/font_roboto_medium" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="36dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="36dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/plugin_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
android:text="@string/lorem_ipsum"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
osmand:typeface="@string/font_roboto_regular" />
|
||||
</LinearLayout>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/plugin_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="19sp"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="@string/lorem_ipsum"/>
|
||||
<ImageButton
|
||||
android:id="@+id/plugin_options"
|
||||
android:layout_width="@dimen/dashListItemHeight"
|
||||
android:layout_height="@dimen/dashListItemHeight"
|
||||
android:layout_gravity="center"
|
||||
android:background="?attr/options_button_background"
|
||||
android:src="?attr/list_settings_icon" />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/plugin_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
tools:text="@string/lorem_ipsum"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="top|end">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/plugin_is_enabled"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|top"
|
||||
android:layout_marginTop="6dp"
|
||||
android:src="?attr/ic_action_check"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/plugin_options"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="?attr/ic_plugin_options"/>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
|
@ -119,8 +119,6 @@ public class PluginsActivity extends OsmandListActivity {
|
|||
TextView pluginDescription = (TextView)view.findViewById(R.id.plugin_description);
|
||||
pluginDescription.setText(plugin.getDescription());
|
||||
|
||||
View pluginIsEnabled = view.findViewById(R.id.plugin_is_enabled);
|
||||
pluginIsEnabled.setVisibility(plugin.isActive() ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
View pluginOptions = view.findViewById(R.id.plugin_options);
|
||||
pluginOptions.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -519,12 +519,6 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
}
|
||||
|
||||
private void updateMyLocation(RoutingHelper rh) {
|
||||
// final Drawable backToLoc = map.getResources().getDrawable(R.drawable.back_to_loc);
|
||||
// final Drawable backToLocWhite = map.getResources().getDrawable(R.drawable.back_to_loc_white);
|
||||
// final Drawable backToLocDisabled = map.getResources().getDrawable(R.drawable.la_backtoloc_disabled);
|
||||
// final Drawable backToLocDisabledWhite = map.getResources().getDrawable(R.drawable.la_backtoloc_disabled_white);
|
||||
// final Drawable backToLocTracked = map.getResources().getDrawable(R.drawable.back_to_loc_tracked);
|
||||
// final Drawable backToLocTrackedWhite = map.getResources().getDrawable(R.drawable.back_to_loc_tracked_white);
|
||||
boolean enabled = mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation() != null;
|
||||
boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation();
|
||||
|
||||
|
@ -532,12 +526,12 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
backToLocationControl.setBg(R.drawable.btn_circle, R.drawable.btn_circle_night);
|
||||
backToLocationControl.setIconColorId(R.color.icon_color_light, 0);
|
||||
} else if (tracked) {
|
||||
backToLocationControl.setIconColorId(0);
|
||||
backToLocationControl.setBg(R.drawable.btn_circle_blue);
|
||||
} else {
|
||||
// TODO different icon
|
||||
backToLocationControl.setIconColorId(R.color.map_widget_icon_color);
|
||||
backToLocationControl.setBg(R.drawable.btn_circle_blue);
|
||||
} else {
|
||||
backToLocationControl.setIconColorId(0);
|
||||
backToLocationControl.setBg(R.drawable.btn_circle_blue);
|
||||
}
|
||||
boolean visible = !(tracked && rh.isFollowingMode());
|
||||
backToLocationControl.updateVisibility(visible);
|
||||
|
|
Loading…
Reference in a new issue