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
+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" />