Skip to content

Commit 81f0b77

Browse files
authored
Merge pull request #904 from wordpress-mobile/release/v1.3.40
Release/v1.3.40
2 parents 3fee0e0 + 973efa4 commit 81f0b77

File tree

173 files changed

+566
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+566
-412
lines changed

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## [1.3.40](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.40)
4+
### Changed
5+
- Adds support to to customise styles for the Aztec Toolbar
6+
7+
## [1.3.39](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.39)
8+
### Fixed
9+
- Move media button initialization to avoid crash when advanced toolbar is enabled and media button is disabled
10+
11+
## [1.3.38](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.38)
12+
### Fixed
13+
- When text changes, only disable selection listener if text is empty
14+
15+
## [1.3.37](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.37)
16+
### Fixed
17+
- Resolved clipboard issue on Android 7
18+
### Changed
19+
- Improved TalkBack handling of formatting toolbar
20+
- Added ability to register an observer for all the changes to the AztecText object
21+
322
## [1.3.36](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.36)
423
### Changed
524
- Implement start and reversed in lists

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ repositories {
105105
```
106106
```gradle
107107
dependencies {
108-
api ('com.github.wordpress-mobile.WordPress-Aztec-Android:aztec:v1.3.36')
108+
api ('com.github.wordpress-mobile.WordPress-Aztec-Android:aztec:v1.3.40')
109109
}
110110
```
111111

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ android {
1111
targetSdkVersion 28
1212
versionCode 1
1313
versionName "1.0"
14+
vectorDrawables.useSupportLibrary = true
1415
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1516
}
1617

app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import android.widget.PopupMenu
2929
import android.widget.ToggleButton
3030
import androidx.appcompat.app.AlertDialog
3131
import androidx.appcompat.app.AppCompatActivity
32+
import androidx.appcompat.content.res.AppCompatResources
3233
import androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback
33-
import androidx.core.content.ContextCompat
3434
import androidx.core.content.FileProvider
3535
import org.wordpress.android.util.AppLog
3636
import org.wordpress.android.util.ImageUtils
@@ -339,7 +339,7 @@ open class MainActivity : AppCompatActivity(),
339339
aztec.visualEditor.setOverlay(predicate, 0, ColorDrawable(0x80000000.toInt()), Gravity.FILL)
340340
aztec.visualEditor.updateElementAttributes(predicate, attrs)
341341

342-
val progressDrawable = ContextCompat.getDrawable(this, android.R.drawable.progress_horizontal)!!
342+
val progressDrawable = AppCompatResources.getDrawable(this, android.R.drawable.progress_horizontal)!!
343343
// set the height of the progress bar to 2 (it's in dp since the drawable will be adjusted by the span)
344344
progressDrawable.setBounds(0, 0, 0, 4)
345345

@@ -361,7 +361,7 @@ open class MainActivity : AppCompatActivity(),
361361

362362
if (attrs.hasAttribute("video")) {
363363
attrs.removeAttribute(attrs.getIndex("video"))
364-
aztec.visualEditor.setOverlay(predicate, 0, ContextCompat.getDrawable(this, android.R.drawable.ic_media_play), Gravity.CENTER)
364+
aztec.visualEditor.setOverlay(predicate, 0, AppCompatResources.getDrawable(this, android.R.drawable.ic_media_play), Gravity.CENTER)
365365
}
366366

367367
aztec.visualEditor.updateElementAttributes(predicate, attrs)

app/src/main/kotlin/org/wordpress/aztec/demo/MediaToolbarAction.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ import org.wordpress.aztec.ITextFormat
55
import org.wordpress.aztec.toolbar.IToolbarAction
66
import org.wordpress.aztec.toolbar.ToolbarActionType
77

8-
enum class MediaToolbarAction constructor(override val buttonId: Int, override val actionType: ToolbarActionType,
9-
override val textFormats: Set<ITextFormat> = setOf()) : IToolbarAction {
10-
GALLERY(R.id.media_bar_button_gallery, ToolbarActionType.OTHER, setOf(AztecTextFormat.FORMAT_NONE)),
11-
CAMERA(R.id.media_bar_button_camera, ToolbarActionType.OTHER, setOf(AztecTextFormat.FORMAT_NONE))
8+
enum class MediaToolbarAction constructor(
9+
override val buttonId: Int,
10+
override val buttonDrawableRes: Int,
11+
override val actionType: ToolbarActionType,
12+
override val textFormats: Set<ITextFormat> = setOf()
13+
) : IToolbarAction {
14+
GALLERY(R.id.media_bar_button_gallery, R.drawable.media_bar_button_image_multiple_selector, ToolbarActionType.OTHER, setOf(AztecTextFormat.FORMAT_NONE)),
15+
CAMERA(R.id.media_bar_button_camera, R.drawable.media_bar_button_camera_selector, ToolbarActionType.OTHER, setOf(AztecTextFormat.FORMAT_NONE))
1216
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<selector
4-
xmlns:android="http://schemas.android.com/apk/res/android" >
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
tools:targetApi="lollipop">
56

67
<item android:drawable="@drawable/ic_action_redo_white_30_24dp" android:state_enabled="false" />
78
<item android:drawable="@drawable/ic_action_redo_white_24dp" />
89

9-
</selector>
10+
</animated-selector>
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<selector
4-
xmlns:android="http://schemas.android.com/apk/res/android" >
3+
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
tools:targetApi="lollipop">
56

67
<item android:drawable="@drawable/ic_action_undo_white_30_24dp" android:state_enabled="false" />
78
<item android:drawable="@drawable/ic_action_undo_white_24dp" />
89

9-
</selector>
10+
</animated-selector>

app/src/main/res/drawable/media_bar_button_camera.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<!-- @color/grey_darken_20 -->
99
<path
10-
android:fillColor="#ff4f748e"
10+
android:fillColor="?attr/toolbarIconNormalColor"
1111
android:pathData="M29,24c0,1.7-1.3,3-3,3s-3-1.3-3-3s1.3-3,3-3S29,22.3,29,24zM34,19v11c0,1.1-0.9,2-2,2H16c-1.1,0-2-0.9-2-2V19c0-1.1,0.9-2,2-2v-1h4v1h2l1-2h6l1,2h2C33.1,17,34,17.9,34,19zM19.5,21c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5S19.5,21.8,19.5,21z M31,24c0-2.8-2.2-5-5-5s-5,2.2-5,5s2.2,5,5,5S31,26.8,31,24z">
1212
</path>
1313

app/src/main/res/drawable/media_bar_button_camera_disabled.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<!-- @color/grey_lighten_20 -->
99
<path
10-
android:fillColor="#ffc8d7e1"
10+
android:fillColor="?attr/toolbarIconDisabledColor"
1111
android:pathData="M29,24c0,1.7-1.3,3-3,3s-3-1.3-3-3s1.3-3,3-3S29,22.3,29,24zM34,19v11c0,1.1-0.9,2-2,2H16c-1.1,0-2-0.9-2-2V19c0-1.1,0.9-2,2-2v-1h4v1h2l1-2h6l1,2h2C33.1,17,34,17.9,34,19zM19.5,21c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5S19.5,21.8,19.5,21z M31,24c0-2.8-2.2-5-5-5s-5,2.2-5,5s2.2,5,5,5S31,26.8,31,24z">
1212
</path>
1313

0 commit comments

Comments
 (0)