diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/SensorsDataAdapter.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/SensorsDataAdapter.kt index 96b1269..64da3f2 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/SensorsDataAdapter.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/SensorsDataAdapter.kt @@ -5,6 +5,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView +import com.example.wikispot.GeneralVariables import com.example.wikispot.R import com.example.wikispot.modelsForAdapters.LabeledValue import kotlinx.android.synthetic.main.labeled_value_item.view.* @@ -19,8 +20,19 @@ class LabeledValuesAdapter(private val context: Context, private val labeledValu fun setData(labeledValue: LabeledValue?, pos: Int) { labeledValue?.let { - itemView.label.text = labeledValue.label - itemView.value.text = labeledValue.value + if (labeledValue.label.startsWith(GeneralVariables.translatePrefix)) { + itemView.label.text = context.resources.getString(context.resources.getIdentifier(labeledValue.label.slice(GeneralVariables.translatePrefix.length until labeledValue.label.length), + "string", context.packageName)) + } else { + itemView.label.text = labeledValue.label + } + + if (labeledValue.value.startsWith(GeneralVariables.translatePrefix)) { + itemView.value.text = context.resources.getString(context.resources.getIdentifier(labeledValue.value.slice(GeneralVariables.translatePrefix.length until labeledValue.value.length), + "string", context.packageName)) + } else { + itemView.value.text = labeledValue.value + } } this.currentLabeledValue = labeledValue diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/chatFragment.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/chatFragment.kt index 550e6c9..05d3421 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/chatFragment.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/chatFragment.kt @@ -202,4 +202,4 @@ class chatFragment : Fragment(R.layout.fragment_chat) { } } -} \ No newline at end of file +} diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/homeFragment.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/homeFragment.kt index 67c8b45..1af5263 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/homeFragment.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/homeFragment.kt @@ -82,7 +82,7 @@ class homeFragment : Fragment(R.layout.fragment_home) { } catch (e: Throwable) { println(e) } } - ServerManagement.serverManager.getData(dataReceiver, requireContext(), 0, "", "GET_WHOLE_ARRAY", 3) + ServerManagement.serverManager.getData(dataReceiver, requireContext(), 0, "", "GET_WHOLE_ARRAY", 4) } diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/projectScopeVariables.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/projectScopeVariables.kt index e495579..94182d6 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/projectScopeVariables.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/projectScopeVariables.kt @@ -18,6 +18,8 @@ object GeneralVariables { const val max_amount_of_saved_messages = 32 const val variableMissingKeyword = "_[{(V,a,r,i,a,b,l,e, ,m,i,s,s,i,n,g)}]_" + const val translatePrefix = "[translate]-" + } object IntentsKeys { diff --git a/app/WikiSpot/app/src/main/res/layout/file_view.xml b/app/WikiSpot/app/src/main/res/layout/file_view.xml index ec77cc4..34aa507 100644 --- a/app/WikiSpot/app/src/main/res/layout/file_view.xml +++ b/app/WikiSpot/app/src/main/res/layout/file_view.xml @@ -96,7 +96,7 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:textColor="@color/secondaryTextColor" + android:textColor="?attr/secondaryTextColor" card_view:layout_constraintEnd_toStartOf="@+id/showFileBtn" card_view:layout_constraintStart_toStartOf="@+id/filenameText" card_view:layout_constraintTop_toBottomOf="@+id/filenameText" diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_another_debug.xml b/app/WikiSpot/app/src/main/res/layout/fragment_another_debug.xml index 74b367f..9c28d74 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_another_debug.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_another_debug.xml @@ -12,7 +12,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/another_debug_fragment" + android:text="another debug fragment" android:textColor="#FFFFFF" android:textSize="30sp" android:textStyle="bold" @@ -27,7 +27,8 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginEnd="32dp" - android:text="@string/_1" + android:textColor="@color/white" + android:text="1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView3" /> @@ -38,7 +39,8 @@ android:layout_marginStart="32dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:text="@string/generate_and_save_data" + android:textColor="@color/white" + android:text="generate and save data" app:layout_constraintEnd_toStartOf="@+id/goFirstDegubFragmentBtn" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView3" /> @@ -49,7 +51,8 @@ android:layout_height="wrap_content" android:layout_marginStart="32dp" android:layout_marginTop="16dp" - android:text="@string/load_and_show_data" + android:textColor="@color/white" + android:text="load and show data" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/generateAndSaveDataBtn" /> @@ -68,7 +71,7 @@ android:id="@+id/dataContentView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/data_content" + android:text="data content" android:textAlignment="center" /> @@ -78,7 +81,8 @@ android:layout_height="wrap_content" android:layout_marginTop="50dp" android:ems="10" - android:hint="@string/attribute_path" + android:textColor="@color/white" + android:hint="attribute path" android:inputType="textPersonName" app:layout_constraintStart_toStartOf="@+id/loadAndShowDataBtn" app:layout_constraintTop_toBottomOf="@+id/loadAndShowDataBtn" /> @@ -88,7 +92,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" - android:text="@string/create_view_connection" + android:textColor="@color/white" + android:text="create view connection" android:textSize="12sp" app:layout_constraintStart_toStartOf="@+id/attributePathInput" app:layout_constraintTop_toBottomOf="@+id/attributePathInput" /> @@ -98,7 +103,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" - android:text="@string/stop_connection" + android:textColor="@color/white" + android:text="stop connection" android:textSize="13sp" app:layout_constraintBottom_toBottomOf="@+id/attributePathInput" app:layout_constraintStart_toEndOf="@+id/attributePathInput" @@ -109,7 +115,7 @@ android:layout_width="160dp" android:layout_height="wrap_content" android:ems="10" - android:hint="@string/file_path" + android:hint="file path" android:inputType="textPersonName" app:layout_constraintBottom_toTopOf="@+id/attributePathInput" app:layout_constraintStart_toStartOf="@+id/loadAndShowDataBtn" diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_debug.xml b/app/WikiSpot/app/src/main/res/layout/fragment_debug.xml index f775441..bc2cb94 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_debug.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_debug.xml @@ -13,8 +13,8 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:textColor="?attr/generalTextColor" - android:text="@string/_2" + android:textColor="@color/white" + android:text="2" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/debugFragmentTitle" /> @@ -23,8 +23,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:textColor="?attr/generalTextColor" - android:text="@string/get_number_of_sent_requests" + android:textColor="@color/white" + android:text="get number of sent requests" android:textSize="12sp" app:layout_constraintEnd_toStartOf="@+id/goSecondDebugFragmentBtn" app:layout_constraintStart_toStartOf="parent" @@ -53,7 +53,7 @@ android:background="#6A5252" android:backgroundTint="#E39595" android:padding="4dp" - android:text="@string/output" /> + android:text="output" /> @@ -62,8 +62,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:textColor="?attr/generalTextColor" - android:text="@string/change_url" + android:textColor="@color/white" + android:text="change url" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/editTextIp" /> @@ -75,7 +75,6 @@ android:layout_marginTop="16dp" android:ems="10" android:inputType="textPersonName" - android:text="@string/name" app:layout_constraintEnd_toEndOf="@+id/scrollView3" app:layout_constraintStart_toStartOf="@+id/scrollView3" app:layout_constraintTop_toBottomOf="@+id/scrollView3" /> @@ -85,8 +84,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:textColor="?attr/generalTextColor" - android:text="@string/clear_server_connections" + android:textColor="@color/white" + android:text="clear server connections" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" @@ -97,8 +96,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:textColor="?attr/generalTextColor" - android:text="@string/restart_app_partially" + android:textColor="@color/white" + android:text="restart app partially" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" @@ -109,7 +108,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="32dp" - android:text="@string/debug_fragment" + android:text="debug fragment" android:textColor="#FFFFFF" android:textSize="30sp" android:textStyle="bold" @@ -123,8 +122,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:textColor="?attr/generalTextColor" - android:text="@string/close_app" + android:textColor="@color/white" + android:text="close app" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_info.xml b/app/WikiSpot/app/src/main/res/layout/fragment_info.xml index 4cce5ed..3c0b5c7 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_info.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_info.xml @@ -76,7 +76,7 @@ + android:layout_margin="4dp" + android:backgroundTint="@color/invisible" + card_view:cardElevation="0dp" + card_view:cardCornerRadius="5dp"> + android:background="@drawable/contrasting_gradient_background" + android:padding="4dp"> @@ -31,11 +34,11 @@ android:id="@+id/value" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="16dp" + android:layout_marginTop="8dp" android:layout_marginEnd="32dp" - android:layout_marginBottom="16dp" - android:textSize="40sp" + android:layout_marginBottom="8dp" android:textColor="?attr/generalTextColor" + android:textSize="30sp" card_view:layout_constraintBottom_toBottomOf="parent" card_view:layout_constraintEnd_toEndOf="parent" card_view:layout_constraintTop_toTopOf="parent" /> diff --git a/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml b/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml index 3b8907e..59c0e27 100644 --- a/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml @@ -8,4 +8,9 @@ Einstellungen Dateien Dunkles Thema + Geschlossen + Öffnen + Anzahl der Personen : + Status : + Temperatur : \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml b/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml index ec9be09..c6efd0d 100644 --- a/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml @@ -8,4 +8,9 @@ Ajustes Archivos Tema oscuro + Temperatura : + Estado : + Número de personas: + Abierto + Cerrado \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml b/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml index cc5c355..055be46 100644 --- a/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml @@ -8,4 +8,9 @@ Domicile Explorer Discuter + Statut : + Température : + Nombre de personnes : + Ouvert + Fermé \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml b/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml index acdf2e1..17d99cb 100644 --- a/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml @@ -8,4 +8,9 @@ ファイル 設定 暗いテーマ + 閉まっている + 開いた + 人々の数 : + 状態 : + 温度: \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml b/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml index 92c240e..9527ec0 100644 --- a/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml @@ -8,4 +8,9 @@ дом просматривать чат + Температура : + Статус : + Число людей : + Открыть + Закрыто \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml b/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml index 464fcc0..5053834 100644 --- a/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml @@ -9,23 +9,9 @@ Súbory Tmavá téma - - Získať počet poslaných requestov - 2/2 - Výstup - Zmeniť Url - Meno - Vyčistiť cache - Reštartovať aplikáciu - Debug 1/2 - Zatvoriť aplikáciu - Debug 2/2 - 1/2 - Vygenerovať a uložiť dáta - Načítať dáta - Obsah dát - Cesta (atributes) - Vytvoriť test spojenie - Zastaviť test spojenie - Cesta (súbor) + Status : + Počet ľudí : + Otvorené + Zatvorené + Teplota : \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml b/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml index 99ecc80..c21a3ae 100644 --- a/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml @@ -8,4 +8,9 @@ 设定值 档案文件 黑暗主题 + 关闭 + 打开 + 人数 : + 温度 : + 地位 : \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values/colors.xml b/app/WikiSpot/app/src/main/res/values/colors.xml index e1c76cc..198fd76 100644 --- a/app/WikiSpot/app/src/main/res/values/colors.xml +++ b/app/WikiSpot/app/src/main/res/values/colors.xml @@ -1,9 +1,10 @@ + #FF000000 #FFFFFFFF + #00000000 - #4CAF50 #388E3C @color/white @@ -57,7 +58,120 @@ #D1FBA0 #F6FEBA - + + + + #020C3C + #0E144A + @color/black + + #E91E63 + #F48FB1 + @color/black + + #F2F2F2 + #CCC5C5C5 + #D6D6D6 + #F0F5F5F5 + + #2E6DDA + #003DAC + #604B4B4B + #EC000000 + + #CEB31111 + #B99D2A2A + + #1A1C33 + #262040 + + #6F3131 + + #5C1313 + #061D4B + #031029 + #191021 + #BF323232 + + #091121 + #08133A + #FA481111 + #1B1A1F +. + #6F0F0F + #0B204A + #001132 + + #590710 + #021A44 + #0B1528 + + #0B1D4B + #0E1A33 + #710E0E + + #8833374A + #7932395E + #6F252D4E + + - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values/strings.xml b/app/WikiSpot/app/src/main/res/values/strings.xml index 45d11e9..b666206 100644 --- a/app/WikiSpot/app/src/main/res/values/strings.xml +++ b/app/WikiSpot/app/src/main/res/values/strings.xml @@ -6,24 +6,15 @@ Map Settings + + Temperature : + Status : + Number of people : + + + Open + Closed + Files Dark theme - Get number of sent requests - 2/2 - Output - Change Url - Name - Clear server connections - Restart app partially - Debug page 1/2 - Close app - Debug page 2/2 - 1/2 - Generate and save data - Load and Show data - Data content - Atributes path - Create test Connection - Stop test Connection - File path \ No newline at end of file