Skip to content

Commit cbabd6e

Browse files
committed
Fixed demo media buttons chacked state.
1 parent c95a48d commit cbabd6e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import org.wordpress.aztec.plugins.wpcomments.toolbar.PageToolbarButton
5959
import org.wordpress.aztec.source.SourceViewEditText
6060
import org.wordpress.aztec.toolbar.AztecToolbar
6161
import org.wordpress.aztec.toolbar.IAztecToolbarClickListener
62+
import org.wordpress.aztec.toolbar.RippleToggleButton
6263
import org.wordpress.aztec.util.AztecLog
6364
import org.xml.sax.Attributes
6465
import java.io.File
@@ -359,6 +360,9 @@ open class MainActivity : AppCompatActivity(),
359360
mediaMenu?.setOnMenuItemClickListener(this@MainActivity)
360361
mediaMenu?.inflate(R.menu.menu_gallery)
361362
mediaMenu?.show()
363+
if(view is RippleToggleButton){
364+
view.isChecked = false
365+
}
362366
}
363367
})
364368

@@ -369,6 +373,9 @@ open class MainActivity : AppCompatActivity(),
369373
mediaMenu?.setOnMenuItemClickListener(this@MainActivity)
370374
mediaMenu?.inflate(R.menu.menu_camera)
371375
mediaMenu?.show()
376+
if(view is RippleToggleButton){
377+
view.isChecked = false
378+
}
372379
}
373380
})
374381

aztec/src/main/res/layout/aztec_format_bar_basic.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
android:layout_width="wrap_content"
4747
android:layout_height="match_parent"
4848
android:background="@drawable/format_bar_button_media_collapsed_selector"
49-
android:contentDescription="@string/format_bar_description_media">
49+
android:contentDescription="@string/format_bar_description_media_normal">
5050
</org.wordpress.aztec.toolbar.RippleToggleButton>
5151

5252
<org.wordpress.aztec.toolbar.RippleToggleButton
@@ -55,7 +55,7 @@
5555
android:layout_width="wrap_content"
5656
android:layout_height="match_parent"
5757
android:background="@drawable/format_bar_button_media_expanded_selector"
58-
android:contentDescription="@string/format_bar_description_media"
58+
android:contentDescription="@string/format_bar_description_media_expanded"
5959
android:visibility="gone">
6060
</org.wordpress.aztec.toolbar.RippleToggleButton>
6161

0 commit comments

Comments
 (0)