Skip to content

Commit

Permalink
Minor updates to interface and strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rt-bishop committed Sep 20, 2020
1 parent d8d6a32 commit ed69a1e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class SharedViewModel @Inject constructor(
try {
val selected = repository.getSelectedEntries().map { it.catNum }
repository.updateSources(list)
repository.updateTransmitters()
repository.updateEntriesFromUrl(list)
repository.updateTransmitters()
repository.updateEntriesSelection(selected)
_updateStatus.postValue(Result.Success(0))
} catch (e: Exception) {
Expand Down
56 changes: 19 additions & 37 deletions app/src/main/res/layout/item_transmitter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,20 @@
<View
android:id="@+id/separator"
android:layout_width="match_parent"
android:padding="15dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_height="1dp"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintTop_toBottomOf="@+id/trans_uplink"
android:background="#333"/>
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp"
android:background="#333"
android:padding="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/trans_uplink" />

<TextView
android:id="@+id/trans_downlink_doppler"
style="@style/CardTransText"
android:layout_marginTop="1dp"
android:text="@string/trans_down_lowHigh_doppler"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/trans_img_downlink_doppler"
Expand Down Expand Up @@ -119,6 +122,7 @@
android:id="@+id/trans_img_downlink"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="1dp"
android:contentDescription="@string/placeholder"
android:rotation="180"
app:layout_constraintBottom_toBottomOf="@+id/trans_downlink"
Expand All @@ -133,6 +137,7 @@
android:id="@+id/trans_img_uplink"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="1dp"
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="@+id/trans_uplink"
app:layout_constraintEnd_toStartOf="@+id/trans_uplink"
Expand All @@ -142,37 +147,12 @@
app:layout_constraintTop_toBottomOf="@+id/trans_downlink"
app:srcCompat="@drawable/ic_arrow" />

<ImageView
android:id="@+id/trans_img_downlink_current"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/placeholder"
android:rotation="180"
app:layout_constraintBottom_toBottomOf="@+id/trans_downlink_doppler"
app:layout_constraintEnd_toStartOf="@+id/trans_img_downlink_doppler"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/trans_downlink_doppler"
app:srcCompat="@drawable/ic_arrow" />

<ImageView
android:id="@+id/trans_img_uplink_current"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="@+id/trans_uplink_doppler"
app:layout_constraintEnd_toStartOf="@+id/trans_img_uplink_doppler"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/trans_downlink_doppler"
app:srcCompat="@drawable/ic_arrow" />

<ImageView
android:id="@+id/trans_img_downlink_doppler"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginTop="1dp"
android:layout_marginEnd="2dp"
android:contentDescription="@string/placeholder"
android:rotation="180"
app:layout_constraintBottom_toBottomOf="@+id/trans_downlink_doppler"
Expand All @@ -185,8 +165,10 @@

<ImageView
android:id="@+id/trans_img_uplink_doppler"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginTop="1dp"
android:layout_marginEnd="2dp"
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="@+id/trans_uplink_doppler"
app:layout_constraintEnd_toStartOf="@+id/trans_uplink_doppler"
Expand Down
22 changes: 12 additions & 10 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@
<string name="pref_time_utc_title">Показывать время пролёта по UTC</string>

<string name="no_mode">Модуляция: нет</string>
<string name="no_uplink">Восход.: нет</string>
<string name="no_downlink">Нисход.: нет</string>
<string name="no_uplink">Восход: нет</string>
<string name="no_downlink">Нисход: нет</string>
<string name="no_uplink_doppler">Тек. восход: нет</string>
<string name="no_downlink_doppler">Тек. нисход: нет</string>
<string name="no_trans">Не найдены трансиверы для этого спутника</string>

<string name="err_no_permissions">Отсутствуют необходимые разрешения</string>
Expand All @@ -91,14 +93,14 @@

<string name="trans_mode">Модуляция: %s</string>
<string name="trans_inverted">Инверсия: %s</string>
<string name="trans_up_low">Восход.: %.4f MHz</string>
<string name="trans_up_lowHigh">Восход.: %.4f - %.4f MHz</string>
<string name="trans_down_low">Нисход.: %.4f MHz</string>
<string name="trans_down_lowHigh">Нисход.: %.4f - %.4f MHz</string>
<string name="trans_up_low_doppler">Восход.: %.4f MHz</string>
<string name="trans_up_lowHigh_doppler">Восход.: %.4f - %.4f MHz</string>
<string name="trans_down_low_doppler">Нисход.: %.4f MHz</string>
<string name="trans_down_lowHigh_doppler">Нисход.: %.4f - %.4f MHz</string>
<string name="trans_up_low">Восход: %.4fMHz</string>
<string name="trans_up_lowHigh">Восход: %.4f - %.4fMHz</string>
<string name="trans_down_low">Нисход: %.4f MHz</string>
<string name="trans_down_lowHigh">Нисход: %.4f - %.4fMHz</string>
<string name="trans_up_low_doppler">Тек. восход: %.4fMHz</string>
<string name="trans_up_lowHigh_doppler">Тек. восход: %.4f - %.4fMHz</string>
<string name="trans_down_low_doppler">Тек. нисход: %.4fMHz</string>
<string name="trans_down_lowHigh_doppler">Тек. нисход: %.4f - %.4fMHz</string>

<string name="info_swipe_text">Проведите по экрану вниз, чтобы обновить список пролетов
для выбранных спутников</string>
Expand Down
20 changes: 10 additions & 10 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
<string name="no_mode">Mode: null</string>
<string name="no_uplink">Uplink: null</string>
<string name="no_downlink">Downlink: null</string>
<string name="no_uplink_doppler">Current uplink: null</string>
<string name="no_downlink_doppler">Current downlink: null</string>
<string name="no_uplink_doppler">Curr. uplink: null</string>
<string name="no_downlink_doppler">Curr. downlink: null</string>
<string name="no_trans">No transceivers found for this satellite</string>

<string name="err_no_permissions">Missing permissions</string>
Expand Down Expand Up @@ -110,14 +110,14 @@
<string name="trans_description" translatable="false">%s</string>
<string name="trans_mode">Mode: %s</string>
<string name="trans_inverted">Inverted: %s</string>
<string name="trans_up_low">Uplink: %.4f MHz</string>
<string name="trans_up_lowHigh">Uplink: %.4f - %.4f MHz</string>
<string name="trans_down_low">Downlink: %.4f MHz</string>
<string name="trans_down_lowHigh">Downlink: %.4f - %.4f MHz</string>
<string name="trans_up_low_doppler">Current uplink: %.4f MHz</string>
<string name="trans_up_lowHigh_doppler">Current uplink: %.4f - %.4f MHz</string>
<string name="trans_down_low_doppler">Current downlink: %.4f MHz</string>
<string name="trans_down_lowHigh_doppler">Current downlink: %.4f - %.4f MHz</string>
<string name="trans_up_low">Uplink: %.4fMHz</string>
<string name="trans_up_lowHigh">Uplink: %.4f - %.4fMHz</string>
<string name="trans_down_low">Downlink: %.4fMHz</string>
<string name="trans_down_lowHigh">Downlink: %.4f - %.4fMHz</string>
<string name="trans_up_low_doppler">Curr. uplink: %.4fMHz</string>
<string name="trans_up_lowHigh_doppler">Curr. uplink: %.4f - %.4fMHz</string>
<string name="trans_down_low_doppler">Curr. downlink: %.4fMHz</string>
<string name="trans_down_lowHigh_doppler">Curr. downlink: %.4f - %.4fMHz</string>

<string name="info_swipe_text">
Swipe the screen to refresh the list of passes for selected satellites</string>
Expand Down

0 comments on commit ed69a1e

Please sign in to comment.