Skip to content

Commit

Permalink
v 22.07.06.0
Browse files Browse the repository at this point in the history
Enable "Select parent view on next click" by default
Force protocol v2
  • Loading branch information
Grigory Rylov committed Jul 6, 2022
1 parent f6f5663 commit ce20716
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'com.github.grishberg.android'
version '22.06.29.0'
version '22.07.06.0'

sourceCompatibility = 11
targetCompatibility = 11
Expand Down Expand Up @@ -35,7 +35,7 @@ if (!hasProperty('studioCompilePath')) {
intellij {
updateSinceUntilBuild true
plugins 'android'
version "212-EAP-SNAPSHOT"
version "213-EAP-SNAPSHOT"
}

runIde {
Expand Down Expand Up @@ -84,6 +84,7 @@ task(verifySetup) {
patchPluginXml {
sinceBuild("211")
changeNotes """
Added 'Round dimensions' menu item to settings.<br>
Enable "Select parent view on next click" feature by default.<br>
Force use protocol level 2.<br>
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object LayoutFileDataParser {
): LayoutFileData {
val bufferedImage: BufferedImage?
var node: ViewNode? = null
var options = LayoutInspectorCaptureOptions()
val options = LayoutInspectorCaptureOptions()
var previewBytes = ByteArray(0)
ObjectInputStream(ByteArrayInputStream(bytes)).use { input ->
// Parse options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ object ViewNodeParser {
if (delimIndex < 0) {
throw IllegalArgumentException("Invalid format for ViewNode, missing @: $data")
}
var name = data.substring(0, delimIndex)
val name = data.substring(0, delimIndex)
data = data.substring(delimIndex + 1)
delimIndex = data.indexOf(' ')
val hash = data.substring(0, delimIndex)
val node = ViewNode(parent, name, hash)
node.index = if (parent == null) 0 else parent!!.children.size
node.index = parent?.children?.size ?: 0
if (data.length > delimIndex + 1) {
loadProperties(node, data.substring(delimIndex + 1), skippedProperties)
node.id = node.getProperty("mID", "id")!!.value
node.id = node.getProperty("mID", "id")?.value
}
node.displayInfo = DisplayInfoFactory.createDisplayInfoFromNode(node)
parent?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class LayoutInspectorCaptureTask(

try {
val version: ProtocolVersion = determineProtocolVersion(
client.device.version.apiLevel,
StudioFlags.LAYOUT_INSPECTOR_V2_PROTOCOL_ENABLED.get()
client.device.version.apiLevel, true
)
val options = LayoutInspectorCaptureOptions()
options.version = version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class PluginState : SettingsFacade {

override var fileNamePrefix: String = ""

override var ignoreLastClickedView: Boolean = false
override var ignoreLastClickedView: Boolean = true

override var roundDimensions: Boolean = true

Expand Down

0 comments on commit ce20716

Please sign in to comment.