forked from organicmaps/organicmaps
Changed theme for welcome screen
This commit is contained in:
parent
983237225a
commit
9d7fd02296
2 changed files with 14 additions and 17 deletions
|
@ -7,29 +7,28 @@
|
|||
<Button
|
||||
android:id="@+id/accept_btn"
|
||||
style="@style/MwmWidget.Button.Primary"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/welcome_btn_min_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:lines="1"
|
||||
android:minWidth="@dimen/welcome_btn_min_height"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:singleLine="true"
|
||||
android:text="@string/accept" />
|
||||
<TextView
|
||||
android:id="@+id/decline_btn"
|
||||
android:layout_toStartOf="@id/accept_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/welcome_btn_min_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/primary_button_min_height"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/margin_half"
|
||||
android:layout_toStartOf="@id/accept_btn"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:gravity="center"
|
||||
android:letterSpacing="0.01"
|
||||
android:minWidth="@dimen/welcome_btn_min_height"
|
||||
android:singleLine="true"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="@dimen/text_size_body_3"
|
||||
android:textStyle="normal"
|
||||
android:layout_centerVertical="true"
|
||||
android:lines="1"
|
||||
tools:text="NOW"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:text="NOW" />
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.mapswithme.maps.R;
|
|||
import com.mapswithme.maps.base.BaseMwmDialogFragment;
|
||||
import com.mapswithme.maps.news.WelcomeScreenBindingType;
|
||||
import com.mapswithme.util.Counters;
|
||||
import com.mapswithme.util.ThemeUtils;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
|
||||
public class WelcomeDialogFragment extends BaseMwmDialogFragment implements View.OnClickListener
|
||||
|
@ -93,7 +94,8 @@ public class WelcomeDialogFragment extends BaseMwmDialogFragment implements View
|
|||
@Override
|
||||
protected int getCustomTheme()
|
||||
{
|
||||
return getFullscreenTheme();
|
||||
return ThemeUtils.isNightTheme() ? R.style.MwmTheme_DialogFragment_NoFullscreen_Night
|
||||
: R.style.MwmTheme_DialogFragment_NoFullscreen;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -141,11 +143,7 @@ public class WelcomeDialogFragment extends BaseMwmDialogFragment implements View
|
|||
image.setImageResource(mWelcomeScreenBindingType.getImage());
|
||||
acceptBtn.setText(mWelcomeScreenBindingType.getAcceptButton());
|
||||
declineBtn.setOnClickListener(v -> {});
|
||||
|
||||
boolean hasSubtitle = mWelcomeScreenBindingType.getSubtitle() != null;
|
||||
UiUtils.showIf(hasSubtitle, subtitle);
|
||||
if (hasSubtitle)
|
||||
subtitle.setText(mWelcomeScreenBindingType.getSubtitle());
|
||||
subtitle.setText(mWelcomeScreenBindingType.getSubtitle());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
Loading…
Add table
Reference in a new issue