Theming and misc changes

* Fix SetupActivity UI Theming
* Changes to overall styling
* And more misc changes
This commit is contained in:
Martinvlba 2024-05-07 20:01:03 -07:00
parent 0147cd594b
commit 248fd6c869
7 changed files with 40 additions and 16 deletions

View File

@ -1,4 +1,4 @@
#!/data/data/io.neoterm/files/usr/bin/bash
#!/data/data/com.evolinx.terminal/files/usr/bin/bash
set -e

View File

@ -54,7 +54,7 @@ class NetworkConnection(private val sourceUrl: String) :
private fun openHttpConnection(): HttpURLConnection {
val arch = SetupHelper.determineArchName()
return URL("$sourceUrl/port/$arch/android/bootstrap-$arch.zip").openConnection() as HttpURLConnection
return URL("$sourceUrl/$arch/android/bootstrap-$arch.zip").openConnection() as HttpURLConnection
}
}
@ -106,7 +106,6 @@ abstract class OfflineConnection : SourceConnection {
*/
open class OfflineUriConnection(private val context: Context, private val uri: Uri) : OfflineConnection() {
@Throws(IOException::class)
override fun openInputStream(): InputStream? {
return context.contentResolver.openInputStream(uri)

View File

@ -16,6 +16,7 @@ import com.evolinx.terminal.component.pm.SourceHelper
import com.evolinx.terminal.setup.*
import com.evolinx.terminal.utils.getPathOfMediaUri
import com.evolinx.terminal.utils.runApt
import com.google.android.material.button.MaterialButton
import java.io.File
@ -62,8 +63,8 @@ class SetupActivity : AppCompatActivity(), View.OnClickListener, ResultListener
findViewById<RadioButton>(R.id.setup_method_local).setOnCheckedChangeListener(onCheckedChangeListener)
findViewById<RadioButton>(R.id.setup_method_backup).setOnCheckedChangeListener(onCheckedChangeListener)
findViewById<Button>(R.id.setup_next).setOnClickListener(this)
findViewById<Button>(R.id.setup_source_parameter_select).setOnClickListener(this)
findViewById<MaterialButton>(R.id.setup_next).setOnClickListener(this)
findViewById<MaterialButton>(R.id.setup_source_parameter_select).setOnClickListener(this)
}
override fun onClick(view: View?) {

View File

@ -48,18 +48,23 @@
android:id="@+id/setup_method_online"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/radiobutton"
android:text="@string/setup_online"/>
<RadioButton
android:id="@+id/setup_method_local"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/radiobutton"
android:enabled="false"
android:text="@string/setup_local"/>
<RadioButton
android:id="@+id/setup_method_backup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/radiobutton"
android:enabled="false"
android:text="@string/setup_backup"/>
</RadioGroup>
@ -82,7 +87,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:focusable="false"
android:clickable="false"
android:clickable="true"
android:editable="true"
android:hint="@string/setup_hint_online"
android:text="@string/default_source_url"/>

View File

@ -15,5 +15,5 @@
<color name="tab_background_color">#131415</color>
<color name="tab_title_text_color">#A8D8D8D8</color>
<color name="button_color">#A88B9FBA</color>
<color name="button_color">#ff14181c</color>
</resources>

View File

@ -26,12 +26,12 @@
<string name="setup_setup_method">Select your installation method</string>
<string name="setup_online">Online Setup</string>
<string name="setup_local">Local Zip File Setup</string>
<string name="setup_backup">Restore from NH-Terminal Backup</string>
<string name="setup_backup">Restore from Terminal Backup</string>
<string name="setup_source_parameter">Source Parameter</string>
<string name="setup_input_source_parameter">Input source parameter…</string>
<string name="setup_dots" translatable="false"></string>
<string name="setup_hint_online">URL of mirror that contains setup zip files</string>
<string name="setup_hint_local">File path to showConfirmDialog zip files</string>
<string name="setup_hint_local">File path to zip files</string>
<string name="setup_hint_backup">File path to backup file(*.neobackup)</string>
<string name="setup_error_file_not_found">File not found</string>
<string name="setup_error_invalid_url">Invalid URL</string>
@ -60,8 +60,8 @@
<string name="float_up">Float Up</string>
<string name="shell_not_found">Shell %s not found</string>
<string name="shell_not_found_message">Would you like you install it?</string>
<string name="fullscreen_mode_changed">FullScreen mode changed, please restart NH-Terminal.</string>
<string name="permission_denied">NH-Terminal cannot get essential permissions, exiting.</string>
<string name="fullscreen_mode_changed">FullScreen mode changed, please restart Terminal.</string>
<string name="permission_denied">Terminal cannot get essential permissions, exiting.</string>
<string name="error">Oops!</string>
<string name="use_system_shell">System Shell</string>
<string name="retry">Retry</string>
@ -195,7 +195,7 @@
<string name="dangerous_zone">Danger Zone</string>
<string name="reset_app_warning">This will delete and re-copy optional files, confirm?</string>
<string name="default_source_url" translatable="false">https://files.martinvlba.eu</string>
<string name="default_source_url" translatable="false">https://files.martinvlba.eu/port</string>
<string-array name="pref_general_shell_entries" translatable="false">
<item>sh</item>
@ -231,7 +231,7 @@
</string-array>
<string-array name="custom_preview_script_colors">
<item>Welcome to NH-Terminal\\n</item>
<item>Welcome to Evolinx\\n</item>
<item>"\\e[30m Dim black \\e[0m\\n"</item>
<item>"\\e[31m Dim red \\e[0m\\n"</item>
<item>"\\e[32m Dim green \\e[0m\\n"</item>

View File

@ -7,15 +7,33 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="checkboxStyle">@style/checkbox_theme</item>
<item name="windowActionModeOverlay">true</item>
<item name="cardViewStyle">@style/nhcardviewstyle</item>
<item name="cardViewStyle">@style/Widget.MaterialComponents.CardView</item>
<item name="android:textViewStyle">@style/Widget.MaterialComponents.TextView</item>
<item name="android:actionBarStyle">@style/AppTheme.ActionBar</item>
<item name="actionBarStyle">@style/AppTheme.ActionBar</item>
<item name="android:textColor">@color/textColor</item>
<item name="actionMenuTextColor">@color/textColor</item>
<item name="radioButtonStyle">@style/radiobutton</item>
<item name="materialButtonStyle">@style/buttontheme</item>
<item name="buttonStyle">@style/buttontheme</item>
</style>
<style name="nhcardviewstyle" parent="@style/Widget.MaterialComponents.CardView">
<style name="buttontheme" parent="Widget.MaterialComponents.Button.TextButton">
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/colorPrimaryDark</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="backgroundTint">@color/button_color</item>
<item name="android:textColor">@color/textColor</item>
</style>
<style name="radiobutton" parent="Widget.Material3.CompoundButton.RadioButton">
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/colorAccent</item>
<item name="colorPrimaryDark">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar" parent="@style/AppTheme">