mirror of
https://github.com/afollestad/nock-nock.git
synced 2025-08-08 08:58:41 +00:00
Move script validation mode UI into included layout, resolve lint error with Rhino by ignoring it, etc.
This commit is contained in:
parent
c7a8148d3c
commit
0785c36b2a
6 changed files with 161 additions and 189 deletions
|
@ -44,14 +44,14 @@ import kotlinx.android.synthetic.main.activity_addsite.inputName
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.inputUrl
|
import kotlinx.android.synthetic.main.activity_addsite.inputUrl
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.nameTiLayout
|
import kotlinx.android.synthetic.main.activity_addsite.nameTiLayout
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.responseValidationMode
|
import kotlinx.android.synthetic.main.activity_addsite.responseValidationMode
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.responseValidationScript
|
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.responseValidationScriptInput
|
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.responseValidationSearchTerm
|
import kotlinx.android.synthetic.main.activity_addsite.responseValidationSearchTerm
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.rootView
|
import kotlinx.android.synthetic.main.activity_addsite.rootView
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.textUrlWarning
|
import kotlinx.android.synthetic.main.activity_addsite.textUrlWarning
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.toolbar
|
import kotlinx.android.synthetic.main.activity_addsite.toolbar
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.urlTiLayout
|
import kotlinx.android.synthetic.main.activity_addsite.urlTiLayout
|
||||||
import kotlinx.android.synthetic.main.activity_addsite.validationModeDescription
|
import kotlinx.android.synthetic.main.activity_addsite.validationModeDescription
|
||||||
|
import kotlinx.android.synthetic.main.include_script_input.responseValidationScript
|
||||||
|
import kotlinx.android.synthetic.main.include_script_input.responseValidationScriptInput
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
|
@ -233,38 +233,16 @@ class AddSiteActivity : AppCompatActivity(), View.OnClickListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val intervalValue = checkIntervalInput.textAsLong()
|
val parsedCheckInterval = getParsedCheckInterval()
|
||||||
|
val selectedValidationMode = getSelectedValidationMode()
|
||||||
|
val selectedValidationContent = getSelectedValidationContent()
|
||||||
|
|
||||||
model = when (checkIntervalSpinner.selectedItemPosition) {
|
|
||||||
0 -> model.copy(checkInterval = intervalValue * (60 * 1000))
|
|
||||||
1 -> model.copy(checkInterval = intervalValue * (60 * 60 * 1000))
|
|
||||||
2 -> model.copy(checkInterval = intervalValue * (60 * 60 * 24 * 1000))
|
|
||||||
else -> model.copy(checkInterval = intervalValue * (60 * 60 * 24 * 7 * 1000))
|
|
||||||
}
|
|
||||||
model = model.copy(lastCheck = currentTimeMillis() - model.checkInterval)
|
|
||||||
|
|
||||||
when (responseValidationMode.selectedItemPosition) {
|
|
||||||
0 -> {
|
|
||||||
model = model.copy(validationMode = STATUS_CODE, validationContent = null)
|
|
||||||
}
|
|
||||||
1 -> {
|
|
||||||
model = model.copy(
|
model = model.copy(
|
||||||
validationMode = TERM_SEARCH,
|
checkInterval = parsedCheckInterval,
|
||||||
validationContent = responseValidationSearchTerm.trimmedText()
|
lastCheck = currentTimeMillis() - parsedCheckInterval,
|
||||||
|
validationMode = selectedValidationMode,
|
||||||
|
validationContent = selectedValidationContent
|
||||||
)
|
)
|
||||||
}
|
|
||||||
2 -> {
|
|
||||||
model = model.copy(
|
|
||||||
validationMode = JAVASCRIPT,
|
|
||||||
validationContent = responseValidationScriptInput.trimmedText()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
throw IllegalStateException(
|
|
||||||
"Unexpected validation mode index: ${responseValidationMode.selectedItemPosition}"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootView.scopeWhileAttached(Main) {
|
rootView.scopeWhileAttached(Main) {
|
||||||
launch(coroutineContext) {
|
launch(coroutineContext) {
|
||||||
|
@ -282,4 +260,36 @@ class AddSiteActivity : AppCompatActivity(), View.OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBackPressed() = closeActivityWithReveal()
|
override fun onBackPressed() = closeActivityWithReveal()
|
||||||
|
|
||||||
|
private fun getParsedCheckInterval(): Long {
|
||||||
|
val intervalInput = checkIntervalInput.textAsLong()
|
||||||
|
return when (checkIntervalSpinner.selectedItemPosition) {
|
||||||
|
0 -> intervalInput * (60 * 1000)
|
||||||
|
1 -> intervalInput * (60 * 60 * 1000)
|
||||||
|
2 -> intervalInput * (60 * 60 * 24 * 1000)
|
||||||
|
else -> intervalInput * (60 * 60 * 24 * 7 * 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getSelectedValidationMode() = when (responseValidationMode.selectedItemPosition) {
|
||||||
|
0 -> STATUS_CODE
|
||||||
|
1 -> TERM_SEARCH
|
||||||
|
2 -> JAVASCRIPT
|
||||||
|
else -> {
|
||||||
|
throw IllegalStateException(
|
||||||
|
"Unexpected validation mode index: ${responseValidationMode.selectedItemPosition}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getSelectedValidationContent() = when (responseValidationMode.selectedItemPosition) {
|
||||||
|
0 -> null
|
||||||
|
1 -> responseValidationSearchTerm.trimmedText()
|
||||||
|
2 -> responseValidationScriptInput.trimmedText()
|
||||||
|
else -> {
|
||||||
|
throw IllegalStateException(
|
||||||
|
"Unexpected validation mode index: ${responseValidationMode.selectedItemPosition}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,6 @@ import kotlinx.android.synthetic.main.activity_viewsite.iconStatus
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.inputName
|
import kotlinx.android.synthetic.main.activity_viewsite.inputName
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.inputUrl
|
import kotlinx.android.synthetic.main.activity_viewsite.inputUrl
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.responseValidationMode
|
import kotlinx.android.synthetic.main.activity_viewsite.responseValidationMode
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.responseValidationScript
|
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.responseValidationScriptInput
|
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.responseValidationSearchTerm
|
import kotlinx.android.synthetic.main.activity_viewsite.responseValidationSearchTerm
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.rootView
|
import kotlinx.android.synthetic.main.activity_viewsite.rootView
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.textLastCheckResult
|
import kotlinx.android.synthetic.main.activity_viewsite.textLastCheckResult
|
||||||
|
@ -67,6 +65,8 @@ import kotlinx.android.synthetic.main.activity_viewsite.textNextCheck
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.textUrlWarning
|
import kotlinx.android.synthetic.main.activity_viewsite.textUrlWarning
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.toolbar
|
import kotlinx.android.synthetic.main.activity_viewsite.toolbar
|
||||||
import kotlinx.android.synthetic.main.activity_viewsite.validationModeDescription
|
import kotlinx.android.synthetic.main.activity_viewsite.validationModeDescription
|
||||||
|
import kotlinx.android.synthetic.main.include_script_input.responseValidationScript
|
||||||
|
import kotlinx.android.synthetic.main.include_script_input.responseValidationScriptInput
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
|
@ -257,7 +257,11 @@ class ViewSiteActivity : AppCompatActivity(),
|
||||||
|
|
||||||
when (this.validationMode) {
|
when (this.validationMode) {
|
||||||
TERM_SEARCH -> responseValidationSearchTerm.setText(this.validationContent ?: "")
|
TERM_SEARCH -> responseValidationSearchTerm.setText(this.validationContent ?: "")
|
||||||
JAVASCRIPT -> responseValidationScriptInput.setText(this.validationContent ?: "")
|
JAVASCRIPT -> {
|
||||||
|
responseValidationScriptInput.setText(
|
||||||
|
this.validationContent ?: getString(R.string.default_js)
|
||||||
|
)
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
responseValidationSearchTerm.setText("")
|
responseValidationSearchTerm.setText("")
|
||||||
responseValidationScriptInput.setText("")
|
responseValidationScriptInput.setText("")
|
||||||
|
@ -311,44 +315,16 @@ class ViewSiteActivity : AppCompatActivity(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val intervalValue = checkIntervalInput.textAsLong()
|
val parsedCheckInterval = getParsedCheckInterval()
|
||||||
|
val selectedValidationMode = getSelectedValidationMode()
|
||||||
currentModel = when (checkIntervalSpinner.selectedItemPosition) {
|
val selectedValidationContent = getSelectedValidationContent()
|
||||||
0 -> currentModel.copy(checkInterval = intervalValue * (60 * 1000))
|
|
||||||
1 -> currentModel.copy(checkInterval = intervalValue * (60 * 60 * 1000))
|
|
||||||
2 -> currentModel.copy(checkInterval = intervalValue * (60 * 60 * 24 * 1000))
|
|
||||||
else -> currentModel.copy(checkInterval = intervalValue * (60 * 60 * 24 * 7 * 1000))
|
|
||||||
}
|
|
||||||
|
|
||||||
currentModel = currentModel.copy(
|
currentModel = currentModel.copy(
|
||||||
lastCheck = currentTimeMillis() - currentModel.checkInterval
|
checkInterval = parsedCheckInterval,
|
||||||
|
lastCheck = currentTimeMillis() - parsedCheckInterval,
|
||||||
|
validationMode = selectedValidationMode,
|
||||||
|
validationContent = selectedValidationContent
|
||||||
)
|
)
|
||||||
|
|
||||||
when (responseValidationMode.selectedItemPosition) {
|
|
||||||
0 -> {
|
|
||||||
currentModel = currentModel.copy(
|
|
||||||
validationMode = STATUS_CODE,
|
|
||||||
validationContent = null
|
|
||||||
)
|
|
||||||
}
|
|
||||||
1 -> {
|
|
||||||
currentModel = currentModel.copy(
|
|
||||||
validationMode = TERM_SEARCH,
|
|
||||||
validationContent = responseValidationSearchTerm.trimmedText()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
2 -> {
|
|
||||||
currentModel = currentModel.copy(
|
|
||||||
validationMode = JAVASCRIPT,
|
|
||||||
validationContent = responseValidationScriptInput.trimmedText()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
throw IllegalStateException(
|
|
||||||
"Unexpected response validation mode index: ${responseValidationMode.selectedItemPosition}"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save button
|
// Save button
|
||||||
|
@ -429,4 +405,36 @@ class ViewSiteActivity : AppCompatActivity(),
|
||||||
val item = toolbar.menu.findItem(R.id.refresh)
|
val item = toolbar.menu.findItem(R.id.refresh)
|
||||||
item.isEnabled = currentModel.status != CHECKING && currentModel.status != WAITING
|
item.isEnabled = currentModel.status != CHECKING && currentModel.status != WAITING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getParsedCheckInterval(): Long {
|
||||||
|
val intervalInput = checkIntervalInput.textAsLong()
|
||||||
|
return when (checkIntervalSpinner.selectedItemPosition) {
|
||||||
|
0 -> intervalInput * (60 * 1000)
|
||||||
|
1 -> intervalInput * (60 * 60 * 1000)
|
||||||
|
2 -> intervalInput * (60 * 60 * 24 * 1000)
|
||||||
|
else -> intervalInput * (60 * 60 * 24 * 7 * 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getSelectedValidationMode() = when (responseValidationMode.selectedItemPosition) {
|
||||||
|
0 -> STATUS_CODE
|
||||||
|
1 -> TERM_SEARCH
|
||||||
|
2 -> JAVASCRIPT
|
||||||
|
else -> {
|
||||||
|
throw IllegalStateException(
|
||||||
|
"Unexpected validation mode index: ${responseValidationMode.selectedItemPosition}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getSelectedValidationContent() = when (responseValidationMode.selectedItemPosition) {
|
||||||
|
0 -> null
|
||||||
|
1 -> responseValidationSearchTerm.trimmedText()
|
||||||
|
2 -> responseValidationScriptInput.trimmedText()
|
||||||
|
else -> {
|
||||||
|
throw IllegalStateException(
|
||||||
|
"Unexpected validation mode index: ${responseValidationMode.selectedItemPosition}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,65 +186,7 @@
|
||||||
tools:ignore="Autofill"
|
tools:ignore="Autofill"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<HorizontalScrollView
|
<include layout="@layout/include_script_input"/>
|
||||||
android:id="@+id/responseValidationScript"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/content_inset"
|
|
||||||
android:layout_marginTop="@dimen/content_inset_half"
|
|
||||||
android:background="@color/colorPrimaryDark"
|
|
||||||
android:elevation="@dimen/fab_elevation"
|
|
||||||
android:padding="@dimen/content_inset_half"
|
|
||||||
android:scrollbars="none"
|
|
||||||
tools:ignore="UnusedAttribute"
|
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="serif-monospace"
|
|
||||||
android:lineSpacingMultiplier="1.4"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="@string/function_declaration"
|
|
||||||
android:textSize="@dimen/code_font_size"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/responseValidationScriptInput"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:fontFamily="serif-monospace"
|
|
||||||
android:gravity="top"
|
|
||||||
android:hint="@string/default_js"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:lineSpacingMultiplier="1.4"
|
|
||||||
android:paddingBottom="@dimen/content_inset_less"
|
|
||||||
android:paddingEnd="@dimen/content_inset_more"
|
|
||||||
android:paddingStart="@dimen/content_inset_more"
|
|
||||||
android:paddingTop="@dimen/content_inset_less"
|
|
||||||
android:scrollHorizontally="true"
|
|
||||||
android:textSize="@dimen/code_font_size"
|
|
||||||
tools:ignore="Autofill,LabelFor,RtlSymmetry"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="serif-monospace"
|
|
||||||
android:text="@string/function_end"
|
|
||||||
android:textSize="@dimen/code_font_size"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</HorizontalScrollView>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/validationModeDescription"
|
android:id="@+id/validationModeDescription"
|
||||||
|
|
|
@ -199,65 +199,7 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<HorizontalScrollView
|
<include layout="@layout/include_script_input"/>
|
||||||
android:id="@+id/responseValidationScript"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/content_inset"
|
|
||||||
android:layout_marginTop="@dimen/content_inset_half"
|
|
||||||
android:background="@color/colorPrimaryDark"
|
|
||||||
android:elevation="@dimen/fab_elevation"
|
|
||||||
android:padding="@dimen/content_inset_half"
|
|
||||||
android:scrollbars="none"
|
|
||||||
tools:ignore="UnusedAttribute"
|
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="serif-monospace"
|
|
||||||
android:lineSpacingMultiplier="1.4"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="@string/function_declaration"
|
|
||||||
android:textSize="@dimen/code_font_size"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/responseValidationScriptInput"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:fontFamily="serif-monospace"
|
|
||||||
android:gravity="top"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:lineSpacingMultiplier="1.4"
|
|
||||||
android:paddingBottom="@dimen/content_inset_less"
|
|
||||||
android:paddingEnd="@dimen/content_inset_more"
|
|
||||||
android:paddingStart="@dimen/content_inset_more"
|
|
||||||
android:paddingTop="@dimen/content_inset_less"
|
|
||||||
android:scrollHorizontally="true"
|
|
||||||
android:text="@string/default_js"
|
|
||||||
android:textSize="@dimen/code_font_size"
|
|
||||||
tools:ignore="Autofill,LabelFor"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="serif-monospace"
|
|
||||||
android:text="@string/function_end"
|
|
||||||
android:textSize="@dimen/code_font_size"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</HorizontalScrollView>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/validationModeDescription"
|
android:id="@+id/validationModeDescription"
|
||||||
|
|
65
app/src/main/res/layout/include_script_input.xml
Normal file
65
app/src/main/res/layout/include_script_input.xml
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<HorizontalScrollView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/responseValidationScript"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/content_inset"
|
||||||
|
android:layout_marginTop="@dimen/content_inset_half"
|
||||||
|
android:background="@color/colorPrimaryDark"
|
||||||
|
android:elevation="@dimen/fab_elevation"
|
||||||
|
android:paddingBottom="@dimen/content_inset"
|
||||||
|
android:paddingLeft="@dimen/content_inset_half"
|
||||||
|
android:paddingRight="@dimen/content_inset_half"
|
||||||
|
android:paddingTop="@dimen/content_inset"
|
||||||
|
android:scrollbars="none"
|
||||||
|
tools:ignore="UnusedAttribute"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="serif-monospace"
|
||||||
|
android:lineSpacingMultiplier="1.4"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/function_declaration"
|
||||||
|
android:textSize="@dimen/code_font_size"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/responseValidationScriptInput"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:fontFamily="serif-monospace"
|
||||||
|
android:gravity="top"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lineSpacingMultiplier="1.6"
|
||||||
|
android:paddingBottom="@dimen/content_inset_less"
|
||||||
|
android:paddingEnd="@dimen/content_inset_more"
|
||||||
|
android:paddingStart="@dimen/content_inset_more"
|
||||||
|
android:paddingTop="@dimen/content_inset_less"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:text="@string/default_js"
|
||||||
|
android:textSize="@dimen/code_font_size"
|
||||||
|
tools:ignore="Autofill,LabelFor,RtlSymmetry"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="serif-monospace"
|
||||||
|
android:text="@string/function_end"
|
||||||
|
android:textSize="@dimen/code_font_size"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</HorizontalScrollView>
|
|
@ -11,6 +11,11 @@ android {
|
||||||
versionCode versions.publishVersionCode
|
versionCode versions.publishVersionCode
|
||||||
versionName versions.publishVersion
|
versionName versions.publishVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For Mozilla Rhino
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue