Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

20.5
-----
* [*] [Jetpack-only] Block Editor: Makes some small changes to the editor's accent colours for consistency. [#16968]
* [*] Use larger thumbnail previews for recommended themes during site creation [https://github.com/wordpress-mobile/WordPress-Android/pull/16848]
* [***] [internal] Block Editor: List block: Adds support for V2 behind a feature flag [https://github.com/WordPress/gutenberg/pull/42702]
* [*] Jetpack App: Use the Jetpack green color for the skip buttons text in site creation [https://github.com/wordpress-mobile/WordPress-Android/pull/16994]
Expand Down
2 changes: 2 additions & 0 deletions WordPress/src/jetpack/res/values-night/colors_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
<color name="colorSecondary">@color/primary_40</color>
<color name="colorSecondaryVariant">@color/primary_50</color>

<color name="colorPrimaryEditor">@color/blue_30</color>

<color name="nav_bar">@color/white</color>
</resources>
2 changes: 2 additions & 0 deletions WordPress/src/jetpack/res/values/colors_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<color name="colorSecondary">@color/primary</color>
<color name="colorSecondaryVariant">@color/primary_40</color>

<color name="colorPrimaryEditor">@color/blue_50</color>

<color name="primary">@color/jetpack_green_50</color>
<color name="primary_0">@color/jetpack_green_0</color>
<color name="primary_5">@color/jetpack_green_5</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatDialogFragment;
import androidx.appcompat.view.ContextThemeWrapper;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;

Expand Down Expand Up @@ -48,7 +49,8 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {

initSite(savedInstanceState);

AlertDialog.Builder builder = new MaterialAlertDialogBuilder(getActivity());
AlertDialog.Builder builder =
new MaterialAlertDialogBuilder(new ContextThemeWrapper(getActivity(), R.style.PostSettingsTheme));
// Get the layout inflater
LayoutInflater inflater = getActivity().getLayoutInflater();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class PostDatePickerDialogFragment : DialogFragment() {

val datePickerDialog = DatePickerDialog(
requireContext(),
R.style.PostSettingsCalendar,
null,
viewModel.year ?: 0,
viewModel.month ?: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.widget.TextView;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.fragment.app.DialogFragment;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;
Expand Down Expand Up @@ -83,7 +84,8 @@ public void onDismiss(DialogInterface dialog) {

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(getActivity());
AlertDialog.Builder builder =
new MaterialAlertDialogBuilder(new ContextThemeWrapper(getActivity(), R.style.PostSettingsTheme));
LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
//noinspection InflateParams
View dialogView = layoutInflater.inflate(R.layout.post_settings_input_dialog, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.fragment.app.DialogFragment;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;
Expand Down Expand Up @@ -72,7 +73,8 @@ public void onAttach(Activity activity) {
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(getActivity());
AlertDialog.Builder builder =
new MaterialAlertDialogBuilder(new ContextThemeWrapper(getActivity(), R.style.PostSettingsTheme));

DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import android.app.TimePickerDialog.OnTimeSetListener
import android.content.Context
import android.os.Bundle
import android.text.format.DateFormat
import androidx.appcompat.view.ContextThemeWrapper
import androidx.fragment.app.DialogFragment
import androidx.lifecycle.ViewModelProvider
import org.wordpress.android.R.style
import org.wordpress.android.WordPress
import org.wordpress.android.ui.posts.PublishSettingsFragmentType.EDIT_POST
import org.wordpress.android.ui.posts.PublishSettingsFragmentType.PREPUBLISHING_NUDGES
Expand All @@ -32,8 +34,9 @@ class PostTimePickerDialogFragment : DialogFragment() {
}

val is24HrFormat = DateFormat.is24HourFormat(activity)
val context = ContextThemeWrapper(activity, style.PostSettingsCalendar)
val timePickerDialog = TimePickerDialog(
activity,
context,
OnTimeSetListener { _, selectedHour, selectedMinute ->
viewModel.onTimeSelected(selectedHour, selectedMinute)
},
Expand Down
1 change: 1 addition & 0 deletions WordPress/src/main/res/layout/add_category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@style/PostSettingsTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_extra_medium_large"
Expand Down
1 change: 1 addition & 0 deletions WordPress/src/main/res/layout/categories_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
android:textAppearance="?attr/textAppearanceSubtitle1"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:gravity="center_vertical"
android:theme="@style/PostSettingsTheme"
tools:text="Pony Category" />
</org.wordpress.android.widgets.CheckedLinearLayout>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/settings_fragment_root"
android:theme="@style/PostSettingsTheme"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/PostSettingsTheme"
android:orientation="vertical">

<com.google.android.material.textfield.TextInputLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/post_settings_input_dialog_input_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/PostSettingsTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_large">
Expand Down
2 changes: 2 additions & 0 deletions WordPress/src/main/res/values-night/colors_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
<color name="colorSecondary">@color/primary_30</color>
<color name="colorSecondaryVariant">@color/primary_50</color>

<color name="colorPrimaryEditor">@color/primary_30</color>

<color name="nav_bar">@color/colorPrimary</color>
</resources>
9 changes: 9 additions & 0 deletions WordPress/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@
<item name="android:textColor">?attr/colorSecondaryVariant</item>
</style>

<!--Post Settings Styles-->
<style name="PostSettingsTheme" parent="Base.Wordpress">
<item name="colorPrimary">@color/colorPrimaryEditor</item>
<item name="colorSecondary">@color/colorPrimaryEditor</item>
<item name="colorSecondaryVariant">@color/colorPrimaryEditor</item>
<item name="colorAccent">@color/colorPrimaryEditor</item>
<item name="colorControlActivated">@color/colorPrimaryEditor</item>
</style>

<!-- Domains -->
<style name="Domains.Button.Primary.Unelevated.OnPrimarySurface" parent="WordPress.Button.Primary.Unelevated" />

Expand Down
2 changes: 2 additions & 0 deletions WordPress/src/main/res/values/colors_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<color name="colorSecondary">@color/primary</color>
<color name="colorSecondaryVariant">@color/primary_70</color>

<color name="colorPrimaryEditor">@color/blue_50</color>

<color name="primary">@color/blue_50</color>
<color name="primary_0">@color/blue_0</color>
<color name="primary_5">@color/blue_5</color>
Expand Down
14 changes: 13 additions & 1 deletion WordPress/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,18 @@
</style>

<!--Post Settings Styles-->
<style name="PostSettingsTheme" parent="Base.Wordpress">
<item name="colorPrimary">@color/colorPrimaryEditor</item>
<item name="colorSecondary">@color/colorPrimaryEditor</item>
<item name="colorAccent">@color/colorPrimaryEditor</item>
<item name="colorControlActivated">@color/colorPrimaryEditor</item>
</style>

<style name="PostSettingsCalendar" parent="ThemeOverlay.Material3.MaterialCalendar">
<item name="colorAccent">@color/colorPrimaryEditor</item>
<item name="colorControlActivated">@color/colorPrimaryEditor</item>
</style>

<style name="PostSettingsCardViewInnerLayout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
Expand All @@ -910,7 +922,7 @@
<style name="PostSettingsSectionHeader">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">?attr/colorPrimary</item>
<item name="android:textColor">@color/colorPrimaryEditor</item>
<item name="android:textAppearance">?attr/textAppearanceSubtitle2</item>
<item name="android:layout_marginBottom">@dimen/margin_small</item>
<item name="android:layout_marginTop">@dimen/margin_extra_large</item>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
ext {
wordPressUtilsVersion = '2.7.0'
wordPressLoginVersion = '0.18.0'
gutenbergMobileVersion = 'v1.81.0'
gutenbergMobileVersion = 'v1.82.0-alpha1'
storiesVersion = '1.4.0'
aboutAutomatticVersion = '0.0.6'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gutenberg_container"
android:theme="@style/GutenbergContainerTheme"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="@android:color/white"
Expand Down
1 change: 1 addition & 0 deletions libs/editor/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@

<!-- Gutenberg -->
<color name="background_color">#f6f7f7</color>
<color name="accent_color">#0675c4</color>

</resources>
4 changes: 4 additions & 0 deletions libs/editor/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<style name="GutenbergContainerTheme" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<item name="colorAccent">@color/accent_color</item>
</style>

<style name="FormatBarButton">
<item name="android:minWidth">@dimen/format_bar_height</item>
<item name="android:minHeight">@dimen/format_bar_height</item>
Expand Down