Splitted main layout into few separate files.

This commit is contained in:
Robert Kolner committed 2011-12-07 19:11:34 +01:00
1 parent 54657e7e4a
commit a44d150054
9 files changed
+176 -149

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
bin
gen
doc
project.properties
+28 -149
View File
@@ -20,130 +20,30 @@
android:gravity="center">
<!-- Opening hours: -->
<LinearLayout android:id="@+id/main_menu_hours"
android:layout_marginBottom="20px"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical">
<!-- OPENING HOURS: -->
<TextView android:id="@+id/main_menu_hours_header"
style="@style/OpeningHoursHeaderText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="@string/main_menu_opening_hours" />
<LinearLayout android:id="@+id/main_menu_hours_neuf_header"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"
android:orientation="horizontal">
<TextView
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:layout_marginLeft="20px"
android:text="Chateau Neuf" />
<!-- This is set in Java: -->
<TextView android:id="@+id/main_menu_hours_neuf"
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout android:id="@+id/main_menu_hours_bc_header"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"
android:orientation="horizontal">
<TextView
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:layout_marginLeft="20px"
android:text="Bokcaféen" />
<!-- This is set in Java: -->
<TextView android:id="@+id/main_menu_hours_bc"
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout android:id="@+id/main_menu_hours_gb_header"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"
android:orientation="horizontal">
<TextView
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:layout_marginLeft="20px"
android:text="Glassbaren" />
<!-- This is set in Java: -->
<TextView android:id="@+id/main_menu_hours_gb"
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
<include layout="@layout/main_hours"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentTop="true"/>
<!-- Row nr 1: -->
<LinearLayout
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_weight="1"
android:gravity="center">
<RelativeLayout android:id="@+id/main_menu_program"
style="@style/MetroTile"
android:background="@drawable/ex1"
android:layout_margin="5px"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:onClick="programButton">
<TextView
style="@style/MetroTileText_bg"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_program" />
</RelativeLayout>
<RelativeLayout android:id="@+id/main_menu_tickets"
style="@style/MetroTile"
android:background="@drawable/ex3"
android:layout_margin="5px"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="0.5"
android:onClick="ticketButton">
<TextView
style="@style/MetroTileText_bg"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_tickets" />
</RelativeLayout>
<include layout="@layout/main_tile_program"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="5px" />
<include layout="@layout/main_tile_news"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="5px" />
</LinearLayout>
<!-- Row nr 2: -->
@@ -154,41 +54,20 @@
android:layout_weight="1"
android:gravity="center">
<include layout="@layout/main_tile_tickets"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="5px" />
<include layout="@layout/main_tile_join"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="5px" />
<RelativeLayout android:id="@+id/main_menu_join"
style="@style/MetroTile"
android:background="@drawable/ex4"
android:layout_margin="5px"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="0.5"
android:onClick="joinButton">
<TextView
style="@style/MetroTileText_bg"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_join" />
</RelativeLayout>
<RelativeLayout android:id="@+id/main_menu_unused"
style="@style/MetroTile"
android:visibility="invisible"
android:background="#000000"
android:layout_margin="5px"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="0.5"
android:onClick="doNothing">
<TextView
style="@style/MetroTileText_bg"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:text="INVALID" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
+85
View File
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_menu_hours"
android:layout_marginBottom="20px"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical">
<!-- OPENING HOURS: -->
<TextView android:id="@+id/main_menu_hours_header"
style="@style/OpeningHoursHeaderText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="@string/main_menu_opening_hours" />
<LinearLayout android:id="@+id/main_menu_hours_neuf_header"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"
android:orientation="horizontal">
<TextView
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:layout_marginLeft="20px"
android:text="Chateau Neuf" />
<!-- This is set in Java: -->
<TextView android:id="@+id/main_menu_hours_neuf"
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout android:id="@+id/main_menu_hours_bc_header"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"
android:orientation="horizontal">
<TextView
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:layout_marginLeft="20px"
android:text="Bokcaféen" />
<!-- This is set in Java: -->
<TextView android:id="@+id/main_menu_hours_bc"
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout android:id="@+id/main_menu_hours_gb_header"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"
android:orientation="horizontal">
<TextView
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:layout_marginLeft="20px"
android:text="Glassbaren" />
<!-- This is set in Java: -->
<TextView android:id="@+id/main_menu_hours_gb"
style="@style/OpeningHoursText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_menu_join"
style="@style/MetroTile"
android:background="@drawable/ex4"
android:onClick="joinButton" >
<TextView
style="@style/MetroTileText_bg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_join" />
</RelativeLayout>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_menu_news"
style="@style/MetroTile"
android:background="@drawable/ex2"
android:onClick="doNothing" >
<TextView
style="@style/MetroTileText_bg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_news" />
</RelativeLayout>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_menu_program"
style="@style/MetroTile"
android:background="@drawable/ex1"
android:onClick="programButton" >
<TextView
style="@style/MetroTileText_bg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_program" />
</RelativeLayout>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_menu_tickets"
style="@style/MetroTile"
android:background="@drawable/ex3"
android:onClick="ticketButton" >
<TextView
style="@style/MetroTileText_bg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/main_menu_tickets" />
</RelativeLayout>
+1
View File
@@ -13,4 +13,5 @@
<string name="error_loading">Vent til oppdateringen fullfører</string><string name="main_menu_program">PROGRAM</string>
<string name="main_menu_opening_hours">ÅPNINGSTIDER I DAG</string>
<string name="main_menu_tickets">BILLETTER</string><string name="main_menu_join">BLI MED</string>
<string name="main_menu_news">NYHETER</string>
</resources>
@@ -66,6 +66,7 @@ public class DnsActivity extends BaseDnsActivity {
findViewById(R.id.main_menu_program),
findViewById(R.id.main_menu_tickets),
findViewById(R.id.main_menu_join),
findViewById(R.id.main_menu_news),
};
for (int i = 0; i < buttons.length; i++) {