Change "Configure profile" button text typeface to "medium"
Configure profile - opens Configure profile screen
This commit is contained in:
parent
b38280d6b9
commit
3eade71667
5 changed files with 24 additions and 5 deletions
|
@ -3,6 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -38,12 +39,13 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|left"
|
||||
android:text="@string/configure_profile"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:textColor="?attr/active_color_basic"
|
||||
android:textSize="@dimen/default_list_text_size" />
|
||||
</FrameLayout>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/profile_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -43,22 +44,24 @@
|
|||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="Bicycle" />
|
||||
|
||||
<TextView
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
tools:text="Type: Bicycle" />
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:background="@drawable/bg_transparent_rounded_profile"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -65,6 +65,7 @@ import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu;
|
|||
import net.osmand.plus.routepreparationmenu.WaypointsFragment;
|
||||
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.settings.ConfigureProfileFragment;
|
||||
import net.osmand.plus.views.BaseMapLayer;
|
||||
import net.osmand.plus.views.MapControlsLayer;
|
||||
import net.osmand.plus.views.MapTileLayer;
|
||||
|
@ -668,7 +669,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
.setListener(new ItemClickListener() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
|
||||
mapActivity.startActivity(new Intent(mapActivity, SettingsProfileActivity.class));
|
||||
ConfigureProfileFragment.showInstance(mapActivity.getSupportFragmentManager());
|
||||
return true;
|
||||
}
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.content.Intent;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.ColorRes;
|
||||
import android.support.v14.preference.SwitchPreference;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import net.osmand.aidl.OsmandAidlApi;
|
||||
|
@ -168,4 +169,17 @@ public class ConfigureProfileFragment extends BaseSettingsFragment {
|
|||
|
||||
return super.onPreferenceChange(preference, newValue);
|
||||
}
|
||||
|
||||
public static boolean showInstance(FragmentManager fragmentManager) {
|
||||
try {
|
||||
ConfigureProfileFragment configureProfileFragment = new ConfigureProfileFragment();
|
||||
fragmentManager.beginTransaction()
|
||||
.replace(R.id.fragmentContainer, configureProfileFragment, TAG)
|
||||
.addToBackStack(TAG)
|
||||
.commitAllowingStateLoss();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue