initial commit

This commit is contained in:
erichhasl
2019-02-23 20:10:18 +01:00
commit 65c00a0b02
44 changed files with 1950 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<General
ip: teuton.local
port: 1234
/>
<Lok
name: Tenter
adresse: 10
maxspeed: 99
/>
<Lok
name: Willi
adresse: 22
maxspeed: 200
/>
</Configuration>
Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

+38
View File
@@ -0,0 +1,38 @@
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MyActivity">
<!-- As the main content view, the view below consumes the entire
space available using match_parent in both dimensions. -->
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tv_ip"
android:layout_gravity="right|bottom" />
</FrameLayout>
<!-- android:layout_gravity="start" tells DrawerLayout to treat
this as a sliding drawer on the left side for left-to-right
languages and on the right side for right-to-left languages.
If you're not building against API 17 or higher, use
android:layout_gravity="left" instead. -->
<!-- The drawer is given a fixed width in dp and extends the full height of
the container. -->
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:name="de.erich.railcontrol.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
+68
View File
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_addlok_name"
android:id="@+id/tv_addlok_name"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="39dp"
android:textSize="20sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_addlok_adresse"
android:id="@+id/tv_addlok_adresse"
android:layout_marginTop="88dp"
android:layout_below="@+id/tv_addlok_name"
android:layout_centerHorizontal="true"
android:textSize="20sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_addlok_maxspeed"
android:id="@+id/tv_addlok_maxspeed"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="20sp"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_addlok_name"
android:layout_below="@+id/tv_addlok_name"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_addlok_adresse"
android:layout_below="@+id/tv_addlok_adresse"
android:layout_centerHorizontal="true"
android:inputType="phone"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_addlok_maxspeed"
android:layout_below="@+id/tv_addlok_maxspeed"
android:layout_centerHorizontal="true"
android:text="@string/et_addlok_maxspeed"
android:inputType="phone"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_addlok_save"
android:id="@+id/btn_addlok_save"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="73dp" />
</RelativeLayout>
+66
View File
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_ip"
android:id="@+id/tv_ip"
android:layout_marginTop="52dp"
android:textSize="24dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_port"
android:id="@+id/tv_port"
android:textSize="24dp"
android:layout_marginTop="43dp"
android:layout_below="@+id/et_ip"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_ip"
android:layout_below="@+id/tv_ip"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_port"
android:layout_below="@+id/tv_port"
android:layout_centerHorizontal="true"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_accept"
android:id="@+id/btn_accept"
android:layout_below="@+id/et_port"
android:layout_centerHorizontal="true"
android:layout_marginTop="48dp"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_add_lok"
android:id="@+id/btn_add_lok"
android:layout_below="@+id/btn_accept"
android:layout_centerHorizontal="true"
android:layout_marginTop="43dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_saveConfig"
android:id="@+id/btn_saveConfig"
android:layout_below="@+id/btn_add_lok"
android:layout_centerHorizontal="true" />
</RelativeLayout>
+81
View File
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/tv_editLok_name"
android:id="@+id/tv_editLok_name"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="43dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/tv_editLok_adresse"
android:id="@+id/tv_editLok_adresse"
android:layout_marginTop="65dp"
android:layout_below="@+id/tv_editLok_name"
android:layout_alignLeft="@+id/tv_editLok_name"
android:layout_alignStart="@+id/tv_editLok_name"
android:layout_centerHorizontal="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/tv_editLok_maxspeed"
android:id="@+id/tv_editLok_maxspeed"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_addlok_save"
android:id="@+id/btn_editLok_save"
android:layout_marginTop="63dp"
android:layout_below="@+id/et_editLok_maxspeed"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_editLok_name"
android:layout_below="@+id/tv_editLok_name"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_editLok_adresse"
android:layout_below="@+id/tv_editLok_adresse"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_editLok_maxspeed"
android:layout_below="@+id/tv_editLok_maxspeed"
android:layout_centerHorizontal="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/delete_Lok"
android:id="@+id/btn_editLok_delete"
android:layout_below="@+id/btn_editLok_save"
android:layout_centerHorizontal="true" />
</RelativeLayout>
+86
View File
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ff9bffc5">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_richtung_text"
android:id="@+id/btn_richtung"
android:layout_marginBottom="58dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
<SeekBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/seekBar"
android:rotation="270"
android:minWidth="250dp"
android:layout_below="@+id/lok_name"
android:layout_centerHorizontal="true"
android:layout_marginTop="131dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lok_name"
android:id="@+id/lok_name"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="41dp"
android:textSize="30sp" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/funktion_1"
android:id="@+id/funktion_1"
android:layout_below="@+id/lok_name"
android:layout_toLeftOf="@+id/lok_name"
android:layout_marginTop="45dp"
android:onClick="onCheckboxClicked" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/funktion_3"
android:id="@+id/funktion_3"
android:layout_alignTop="@+id/funktion_1"
android:layout_toRightOf="@+id/lok_name"
android:onClick="onCheckboxClicked" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/funktion_2"
android:id="@+id/funktion_2"
android:layout_alignTop="@+id/seekBar"
android:layout_alignLeft="@+id/funktion_1"
android:layout_alignStart="@+id/funktion_1"
android:onClick="onCheckboxClicked" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/funktion_4"
android:id="@+id/funktion_4"
android:layout_alignTop="@+id/seekBar"
android:layout_alignLeft="@+id/funktion_3"
android:layout_alignStart="@+id/funktion_3"
android:onClick="onCheckboxClicked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/tv_direction"
android:layout_centerHorizontal="true"
android:layout_marginTop="470dp"/>
</RelativeLayout>
+45
View File
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MyActivity$PlaceholderFragment">
<TextView
android:id="@+id/section_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_connect_text"
android:id="@+id/btn_connect"
android:layout_below="@+id/section_label"
android:layout_centerHorizontal="true"
android:layout_marginTop="67dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_quit_text"
android:id="@+id/btn_quit"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="105dp" />
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/select_ip_txt"
android:id="@+id/select_ip"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="24dp" />
</RelativeLayout>
@@ -0,0 +1,9 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#cccc"
tools:context=".NavigationDrawerFragment" />
+8
View File
@@ -0,0 +1,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="de.erich.railcontrol.EditLok" >
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
android:showAsAction="never" />
</menu>
+6
View File
@@ -0,0 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
android:showAsAction="never" />
</menu>
+11
View File
@@ -0,0 +1,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MyActivity" >
<item android:id="@+id/action_example"
android:title="@string/action_example"
android:showAsAction="withText|ifRoom" />
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
android:showAsAction="never" />
</menu>
+6
View File
@@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
+9
View File
@@ -0,0 +1,9 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
https://developer.android.com/design/patterns/navigation-drawer.html -->
<dimen name="navigation_drawer_width">240dp</dimen>
</resources>
+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Railcontrol</string>
<string name="title_section1">Startseite</string>
<string name="title_section2">Konfiguration</string>
<string name="title_section3">E 10</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="action_example">Strom</string>
<string name="action_settings">Lok ändern</string>
<string name="btn_connect_text">Verbinden</string>
<string name="btn_send_text">Senden</string>
<string name="btn_quit_text">Trennen</string>
<string name="btn_richtung_text">Richtungswechsel</string>
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="lok_name">E 10</string>
<string name="funktion_1">Funktion 1</string>
<string name="funktion_2">Funktion 2</string>
<string name="funktion_3">Funktion 3</string>
<string name="funktion_4">Funktion 4</string>
<string name="select_ip_txt">Online</string>
<string name="tv_ip">IP - Adresse</string>
<string name="tv_port">Port</string>
<string name="btn_accept">Speichern</string>
<string name="btn_add_lok">Lok hinzufügen</string>
<string name="tv_addlok_name">Name</string>
<string name="tv_addlok_adresse">Adresse</string>
<string name="tv_addlok_maxspeed">Geschwindigkeitsstufen</string>
<string name="btn_addlok_save">Speichern</string>
<string name="et_addlok_maxspeed">28</string>
<string name="btn_addlok_cancel">Abbrechen</string>
<string name="btn_saveConfig">Konfiguration speichern</string>
<string name="btn_editLok">Lok ändern</string>
/> <string name="title_activity_edit_lok">EditLokActivity</string>
<string name="hello_world">Hello world!</string>
<string name="tv_editLok_name">Name</string>
<string name="tv_editLok_adresse">Adresse</string>
<string name="tv_editLok_maxspeed">Geschwindigkeitsstufen</string>
<string name="delete_Lok">Lok löschen</string>
</resources>
+8
View File
@@ -0,0 +1,8 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</resources>