Skip to content

Commit

Permalink
Update resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrivoruchko committed Sep 13, 2016
1 parent 2ceb99c commit 0eb43c7
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:design:24.2.0'
compile 'com.google.firebase:firebase-crash:9.4.0'
compile 'com.squareup:otto:1.3.8'
compile 'org.greenrobot:eventbus:3.0.0'
}

apply plugin: 'com.google.gms.google-services'
15 changes: 9 additions & 6 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
# public *;
#}

#-keep class com.androidplot.** { *; }

-keepattributes *Annotation*
# EventBus 3.0
-keepclassmembers class ** {
@com.squareup.otto.Subscribe public *;
@com.squareup.otto.Produce public *;
}
public void onMessageEvent*(**);
}

# EventBus 3.0 annotation
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/button_main_activity_start_stop.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#455a64" android:state_checked="true" />
<item android:color="#993200" android:state_checked="false" />
<item android:color="@color/colorPrimaryDark" android:state_checked="true" />
<item android:color="@color/colorAccent" android:state_checked="false" />
</selector>
34 changes: 19 additions & 15 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<data>

<variable
name="viewModel"
type="info.dvkr.screenstream.viewModel.MainActivityViewModel" />
type="info.dvkr.screenstream.viewModel.MainActivityViewModel"/>
</data>

<LinearLayout xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout_main_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/activity_margin"
tools:context="info.dvkr.screenstream.view.MainActivity">
<LinearLayout android:id="@+id/layout_main_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/activity_margin"
tools:context="info.dvkr.screenstream.view.MainActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/main_activity_device_address"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/textColorSecondary" />
android:textColor="@color/textColorSecondary"/>

<TextView
android:layout_width="match_parent"
Expand All @@ -32,7 +32,8 @@
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@{viewModel.serverAddressText}"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@{viewModel.serverAddressColor}" />
android:textColor="@{viewModel.serverAddressColor}"
tools:text="http://127.0.0.1:8080"/>

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -46,7 +47,8 @@
android:gravity="center"
android:text="@{viewModel.pinTitleText}"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@{viewModel.pinTitleColor}" />
android:textColor="@{viewModel.pinTitleColor}"
tools:text="Pin:"/>

<TextView
android:layout_width="wrap_content"
Expand All @@ -56,7 +58,8 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/colorAccent"
android:textStyle="bold"
android:visibility="@{viewModel.pinVisibility}" />
android:visibility="@{viewModel.pinVisibility}"
tools:text="0000"/>
</LinearLayout>

<ToggleButton
Expand All @@ -71,7 +74,7 @@
android:textColor="@drawable/button_main_activity_start_stop"
android:textOff="@string/main_activity_start_stream"
android:textOn="@string/main_activity_stop_stream"
android:textSize="16sp" />
android:textSize="16sp"/>

<TextView
android:layout_width="match_parent"
Expand All @@ -81,6 +84,7 @@
android:paddingTop="@dimen/activity_vertical_margin_small"
android:text="@{viewModel.connectedClientsText}"
android:textColor="@color/textColorSecondary"
android:textSize="16sp" />
android:textSize="16sp"
tools:text="Connected clients: 0"/>
</LinearLayout>
</layout>
2 changes: 1 addition & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<string name="image_generator_reload_this_page">Обновите страницу</string>
<string name="pref_hide_pin">Прятать PIN-код</string>
<string name="pref_hide_pin_summary">При трансляции скрывать PIN-код</string>
<string name="main_activity_error_title">Ошибка</string>
<string name="main_activity_error_title">Ошибка.</string>
<string name="main_activity_error_msg_unknown_format">Система отдает изображение в неизвестном формате. На данный момент исправления нет.</string>
<string name="html_no_mjpeg_support">Ой :(&lt;br&gt;Этот браузер не поддерживает MJPEG</string>
</resources>
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<string name="main_activity_no_wifi_connected">No WiFi connected</string>
<string name="main_activity_toast_cast_permission_deny">Screen Cast permission denied</string>
<string name="main_activity_snackbar_port_in_use">Port already in use\nChoose another one</string>
<string name="main_activity_error_title">Oops! Error</string>
<string name="main_activity_error_msg_unknown_format">System return image in unknown format. Currently no fix available.\nSorry.</string>
<string name="main_activity_error_title">Error.</string>
<string name="main_activity_error_msg_unknown_format">System returns image in unknown format. Currently no fix available.\nSorry.</string>
<string name="main_activity_error_action_ok" translatable="false">OK</string>

<!--ForegroundService-->
Expand Down

0 comments on commit 0eb43c7

Please sign in to comment.