UI fixes
This commit is contained in:
parent
d63e21668f
commit
5ea855ed61
2 changed files with 34 additions and 37 deletions
|
@ -1,36 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/bg_color"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:layout_marginTop="@dimen/dialog_content_margin">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="0dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/back_button"
|
||||
style="@style/Widget.AppCompat.Toolbar.Button.Navigation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:contentDescription="@string/shared_string_back"
|
||||
app:srcCompat="@drawable/ic_arrow_back"
|
||||
app:tint="@color/icon_color_default_light" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_above="@id/buttons">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -49,7 +35,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/content_padding"
|
||||
android:layout_marginTop="@dimen/content_padding"
|
||||
android:layout_marginTop="@dimen/content_padding_small"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_marginBottom="@dimen/dashPadding"
|
||||
android:gravity="center_horizontal"
|
||||
|
@ -68,23 +54,25 @@
|
|||
android:layout_marginTop="@dimen/dashPadding"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:lineSpacingMultiplier="@dimen/bottom_sheet_text_spacing_multiplier"
|
||||
app:typeface="@string/font_roboto_regular"
|
||||
android:text="@string/register_on_openplacereviews_desc"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textColorLink="@color/icon_color_active_light"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
android:textColorLink="@color/icon_color_active_light" />
|
||||
app:typeface="@string/font_roboto_regular" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginLeft="@dimen/content_padding"
|
||||
android:layout_marginTop="@dimen/content_padding_small"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_marginBottom="@dimen/content_padding_small"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
|
@ -102,4 +90,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
|
@ -16,10 +16,12 @@ import android.widget.TextView;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.browser.customtabs.CustomTabsIntent;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
|
@ -37,15 +39,22 @@ public class OprStartFragment extends BaseOsmAndFragment implements OprAuthoriza
|
|||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls();
|
||||
View v = UiUtilities.getInflater(requireMyActivity(), nightMode).inflate(R.layout.fragment_opr_login, container,
|
||||
false);
|
||||
View createAccount = v.findViewById(R.id.register_opr_create_account);
|
||||
v.findViewById(R.id.back_button).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
View v = UiUtilities.getInflater(requireMyActivity(), nightMode).inflate(R.layout.fragment_opr_login, container, false);
|
||||
AndroidUtils.addStatusBarPadding21v(requireMyActivity(), v);
|
||||
|
||||
Toolbar toolbar = (Toolbar) v.findViewById(R.id.toolbar);
|
||||
int icBackResId = AndroidUtils.getNavigationIconResId(v.getContext());
|
||||
toolbar.setNavigationIcon(getContentIcon(icBackResId));
|
||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
View createAccount = v.findViewById(R.id.register_opr_create_account);
|
||||
UiUtilities.setupDialogButton(nightMode, createAccount, UiUtilities.DialogButtonType.PRIMARY,
|
||||
R.string.register_opr_create_new_account);
|
||||
createAccount.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
Loading…
Reference in a new issue