Init
This commit is contained in:
commit
f8f4b25050
29 changed files with 917 additions and 0 deletions
BIN
app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
4
app/src/main/res/layout/activity_main.xml
Normal file
4
app/src/main/res/layout/activity_main.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container"
|
||||
android:layout_width="match_parent" android:layout_height="match_parent"
|
||||
tools:context=".MainActivity" tools:ignore="MergeRootFrame" />
|
62
app/src/main/res/layout/fragment_main.xml
Normal file
62
app/src/main/res/layout/fragment_main.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<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=".MainActivity$PlaceholderFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true">
|
||||
|
||||
<Switch
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wlan_switcher"
|
||||
android:id="@+id/switchWLAN"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:checked="false" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/txtPass"
|
||||
android:inputType="text" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/button_outer_door"
|
||||
android:id="@+id/button3"
|
||||
android:onClick="buttonOpenOuterDoor"
|
||||
android:clickable="false"
|
||||
android:enabled="false" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/button_inner_door"
|
||||
android:id="@+id/button2"
|
||||
android:onClick="buttonOpenInnerDoor"
|
||||
android:enabled="false" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/button"
|
||||
android:text="@string/button_inner_door_open"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
6
app/src/main/res/menu/menu_main.xml
Normal file
6
app/src/main/res/menu/menu_main.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
|
||||
<item android:id="@+id/action_settings" android:title="@string/action_settings"
|
||||
android:orderInCategory="100" app:showAsAction="never" />
|
||||
</menu>
|
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
6
app/src/main/res/values-w820dp/dimens.xml
Normal 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>
|
5
app/src/main/res/values/dimens.xml
Normal file
5
app/src/main/res/values/dimens.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
23
app/src/main/res/values/strings.xml
Normal file
23
app/src/main/res/values/strings.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Türöffner</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="unlock_door">Sesam öffne dich</string>
|
||||
<string name="button_wlan">✘ WLAN</string>
|
||||
<string name="button_outer_door">Buzzer</string>
|
||||
<string name="button_inner_door">Aufschliesen</string>
|
||||
<string name="button_wlan_connected">✓ WLAN</string>
|
||||
<string name="could_not_connect">Konnte nicht zum WLAN „Krautspace“ verbinden.</string>
|
||||
<string name="door_key">DoorKey</string>
|
||||
<string name="wlan_switcher">Tür WLAN aktivieren</string>
|
||||
<string name="button_inner_door_open">Öffnen</string>
|
||||
<string name="wlan_activated">WLAN „KrautSpace“ aktiviert.</string>
|
||||
<string name="wlan_connected">WLAN „KrautSpace“ verbunden.</string>
|
||||
<string name="wlan_deactivated">WLAN „KrautSpace“ deaktiviert.</string>
|
||||
<string name="buzzer_success">Buzzer betätigt</string>
|
||||
<string name="door_unlock">Tür entsperrt</string>
|
||||
<string name="door_open">Tür geöffnet</string>
|
||||
|
||||
</resources>
|
8
app/src/main/res/values/styles.xml
Normal file
8
app/src/main/res/values/styles.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
Reference in a new issue