Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): debugServerHost invalid setting #3841

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import android.widget.ImageView
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.AppCompatEditText
import androidx.core.view.WindowInsetsControllerCompat
import com.tencent.mtt.hippy.HippyEngine
import com.tencent.mtt.hippy.utils.LogUtils
Expand Down Expand Up @@ -175,16 +176,16 @@ class PageConfiguration : AppCompatActivity(), View.OnClickListener {
}
val debugButton =
pageConfigurationRoot.findViewById<View>(R.id.page_configuration_debug_setting_image)
val debugServerHost =
val debugServerHostParent =
pageConfigurationRoot.findViewById<View>(R.id.page_configuration_debug_server_host)
debugButton.setOnClickListener {
if (debugMode) {
(debugButton as ImageView).setImageResource(R.drawable.page_config_debug_off_2x)
debugServerHost.visibility = View.GONE
debugServerHostParent.visibility = View.GONE
debugMode = false
} else {
(debugButton as ImageView).setImageResource(R.drawable.page_config_debug_on_2x)
debugServerHost.visibility = View.VISIBLE
debugServerHostParent.visibility = View.VISIBLE
debugMode = true
}
}
Expand All @@ -202,6 +203,11 @@ class PageConfiguration : AppCompatActivity(), View.OnClickListener {
val createButton =
pageConfigurationRoot.findViewById<View>(R.id.page_configuration_create_image)
createButton.setOnClickListener { v ->
val debugServerHostInput =
pageConfigurationRoot.findViewById<View>(R.id.page_configuration_debug_server_host_input)
(debugServerHostInput as AppCompatEditText)?.let {
debugServerHost = it.text.toString()
}
onCreateClick()
}
}
Expand Down
Loading