Skip to content

Commit

Permalink
work version
Browse files Browse the repository at this point in the history
  • Loading branch information
Galakart committed Dec 8, 2013
1 parent 0cab002 commit f60c26a
Show file tree
Hide file tree
Showing 59 changed files with 678 additions and 90 deletions.
7 changes: 6 additions & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@android:style/Theme.Black.NoTitleBar" >
<activity
android:name="ru.galakart.majordroid.MainActivity"
android:label="@string/app_name"
Expand All @@ -35,6 +35,11 @@
android:label="@string/action_settings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="ru.galakart.majordroid.AboutActivity"
android:label="@string/title_activity_about"
android:screenOrientation="portrait" >
</activity>
</application>

</manifest>
Binary file removed ic_launcher-web.png
Binary file not shown.
Binary file added res/drawable-hdpi/cooltext1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/cooltext9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_action_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_action_pult.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_action_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_action_voice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/logo_about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed res/drawable-xxhdpi/ic_launcher.png
Binary file not shown.
51 changes: 51 additions & 0 deletions res/layout/activity_about.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:tools="https://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".AboutActivity" >

<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/logo_about" />

<TextView
android:id="@+id/tv_text"
style="@android:style/TextAppearance.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="125dp"
android:gravity="center_horizontal"
android:text="@string/about_text" />

<Button
android:id="@+id/btn_rate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:onClick="btn_rate_exec"
android:text="@string/title_btn_rate" />

<TextView
android:id="@+id/tv_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp"
android:autoLink="web"
android:text="@string/about_url" />

</RelativeLayout>
120 changes: 105 additions & 15 deletions res/layout/activity_contros.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,106 @@
<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:tools="https://schemas.android.com/tools"
<LinearLayout xmlns:android="https://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ControsActivity" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

</RelativeLayout>
android:layout_height="match_parent" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:paddingLeft="10dip"
android:paddingRight="10dip" >

<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:shrinkColumns="*"
android:stretchColumns="*" >

<TableRow>

<ImageView
android:id="@+id/imgb_script1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script1_exec"
android:src="@drawable/cooltext1" />

<ImageView
android:id="@+id/imgb_script2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script2_exec"
android:src="@drawable/cooltext2" />

<ImageView
android:id="@+id/imgb_script3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script3_exec"
android:src="@drawable/cooltext3" />
</TableRow>

<TableRow>

<ImageView
android:id="@+id/imgb_script4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script4_exec"
android:src="@drawable/cooltext4" />

<ImageView
android:id="@+id/imgb_script5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script5_exec"
android:src="@drawable/cooltext5" />

<ImageView
android:id="@+id/imgb_script6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script6_exec"
android:src="@drawable/cooltext6" />
</TableRow>

<TableRow>

<ImageView
android:id="@+id/imgb_script7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script7_exec"
android:src="@drawable/cooltext7" />

<ImageView
android:id="@+id/imgb_script8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script8_exec"
android:src="@drawable/cooltext8" />

<ImageView
android:id="@+id/imgb_script9"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="imgb_script9_exec"
android:src="@drawable/cooltext9" />
</TableRow>

<TextView
android:id="@+id/textView_legend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="vertical" />
</TableLayout>

<WebView
android:id="@+id/webPost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="invisible" />
</LinearLayout>

</LinearLayout>
84 changes: 69 additions & 15 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,70 @@
<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:tools="https://schemas.android.com/tools"
<LinearLayout xmlns:android="https://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >

<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" />

</RelativeLayout>
android:layout_height="match_parent" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical" >

<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:shrinkColumns="*"
android:stretchColumns="*" >

<TableRow>

<ImageView
android:id="@+id/imgb_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="imgb_home_click"
android:src="@drawable/ic_action_home" />

<ImageView
android:id="@+id/imgb_voice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="imgb_voice_click"
android:src="@drawable/ic_action_voice" />

<ImageView
android:id="@+id/imgb_pult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="imgb_pult_click"
android:src="@drawable/ic_action_pult" />

<ImageView
android:id="@+id/imgb_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="imgb_settings_click"
android:src="@drawable/ic_action_settings" />
</TableRow>
</TableLayout>

<ProgressBar
android:id="@+id/pB1"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="5dp"
android:layout_centerVertical="true"
android:padding="1dip" />

<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

<WebView
android:id="@+id/webPost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible" />
</LinearLayout>

</LinearLayout>
5 changes: 5 additions & 0 deletions res/menu/about.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<menu xmlns:android="https://schemas.android.com/apk/res/android" >



</menu>
6 changes: 1 addition & 5 deletions res/menu/contros.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<menu xmlns:android="https://schemas.android.com/apk/res/android" >

<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>


</menu>
11 changes: 5 additions & 6 deletions res/menu/main.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<menu xmlns:android="https://schemas.android.com/apk/res/android" >

<item
android:id="@+id/action_settings"
android:id="@+id/action_about"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>

android:title="@string/title_activity_about"/>
<item
android:id="@+id/action_controls"
android:id="@+id/action_quit"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/title_activity_contros"/>
android:title="@string/action_quit"/>

</menu>
</menu>
5 changes: 5 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
<item>Локальный</item>
<item>Глобальный</item>
</string-array>

<string-array name="vid">
<item>Обычный</item>
<item>Полноэкранный</item>
</string-array>
</resources>
2 changes: 1 addition & 1 deletion res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">48dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>

</resources>
24 changes: 22 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

<string name="app_name">MajorDroid</string>
<string name="action_settings">Настройки</string>
<string name="action_quit">Выход</string>
<string name="hello_world">Hello world!</string>
<string name="title_activity_contros">Кнопки управления</string>
<string name="title_activity_contros">Пульт управления</string>
<string name="action_voice">Голосовая команда</string>
<string name="action_refresh">Обновить</string>
<string name="localUrl">Локальный адрес</string>
<string name="localUrl_summary">Адрес сервера в локальной сети</string>
<string name="globalUrl">Глобальный адрес</string>
Expand All @@ -14,6 +17,23 @@
<string name="passw">Пароль</string>
<string name="passw_summary">Пароль для внешнего доступа</string>
<string name="dostup">Режим доступа</string>
<string name="dostup_summary">Доступ локальный или глобальный</string>
<string name="dostup_summary">Локальный или глобальный</string>
<string name="vid">Интерфейс</string>
<string name="vid_summary">Обычный или полноэкранный</string>
<string name="scriptdialog">Название скрипта в MajorDomo:</string>
<string name="script_summary">Задайте название скрипта</string>
<string name="scriptname1">Скрипт 1</string>
<string name="scriptname2">Скрипт 2</string>
<string name="scriptname3">Скрипт 3</string>
<string name="scriptname4">Скрипт 4</string>
<string name="scriptname5">Скрипт 5</string>
<string name="scriptname6">Скрипт 6</string>
<string name="scriptname7">Скрипт 7</string>
<string name="scriptname8">Скрипт 8</string>
<string name="scriptname9">Скрипт 9</string>
<string name="title_activity_about">О программе</string>
<string name="title_btn_rate">Оценить приложение</string>
<string name="about_url">https://smartliving.ru</string>
<string name="about_text">Приложение для управления сервером умного дома MajorDomo.\n\nВерсия 1.0</string>

</resources>
Loading

0 comments on commit f60c26a

Please sign in to comment.