Skip to content

Commit

Permalink
Add icons, text and layouts
Browse files Browse the repository at this point in the history
Add restaurant search in map view
Change way to view list of restaurant search
  • Loading branch information
amcereijo committed Dec 2, 2012
1 parent e36b865 commit 54cad86
Show file tree
Hide file tree
Showing 29 changed files with 482 additions and 202 deletions.
9 changes: 5 additions & 4 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@
android:configChanges="keyboardHidden|orientation" >
</activity>

<uses-library android:name="com.google.android.maps" />

<activity
android:name=".restaurant.TRCardManagerRestaurantMapsActivity"
android:label="@string/title_activity_trcard_manager_restaurant_maps" >
android:name=".restaurant.TRCardManagerRestaurantMapsActivity">
</activity>

<uses-library android:name="com.google.android.maps" />



</application>

</manifest>
Binary file modified res/drawable-ldpi/android_maps.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-xhdpi/android_maps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions res/drawable/select_restaurant_border_selected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

<stroke android:width="1sp" android:color="#041F50" />

<solid android:color="#041A00"/>

<padding android:left="10dip" android:top="14dip"
android:right="10dip" android:bottom="14dip" />
<corners android:radius="4dip"/>


</shape>
26 changes: 19 additions & 7 deletions res/layout/restaurant_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
android:layout_height="wrap_content"
android:padding="0sp"
android:layout_margin="0sp"
android:background="#FFFFFF">
android:background="@android:color/white"
>

<RelativeLayout
android:id="@+id/restaurant_data_info_layout"
Expand All @@ -21,7 +22,7 @@
android:paddingBottom="2sp"
android:paddingLeft="2sp"
android:paddingRight="2sp"
android:paddingTop="2sp"
android:paddingTop="6sp"
android:text=""
android:textColor="#2A4678"
android:textStyle="bold" />
Expand Down Expand Up @@ -69,9 +70,9 @@
android:layout_alignParentTop="true"
android:paddingBottom="2sp"
android:paddingLeft="2sp"
android:paddingRight="4sp"
android:paddingTop="0sp"
android:text="X"
android:paddingRight="8sp"
android:paddingTop="4sp"
android:background="@android:drawable/btn_dialog"
android:textColor="#2A4678"
android:textStyle="bold"
android:clickable="true"/>
Expand All @@ -84,7 +85,7 @@
android:layout_below="@id/restaurant_data_info_layout"
android:gravity="center">

<TextView
<!-- TextView
android:id="@+id/restaurant_data_maps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -95,7 +96,18 @@
android:onClick="openMap"
android:textColor="#2A4678"
android:textStyle="bold"
android:typeface="sans" />
android:typeface="sans" /-->
<ImageButton
android:id="@+id/restaurant_data_maps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4sp"
android:layout_marginTop="4sp"
android:background="@null"
android:src="@drawable/android_maps"
android:contentDescription="@string/restaurant_data_maps_text"
android:gravity="center_vertical|center_horizontal"
android:onClick="openMap"/>

<ImageButton
android:id="@+id/restaurant_data_waze_image"
Expand Down
51 changes: 51 additions & 0 deletions res/layout/restaurant_data_list_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="0sp"
android:layout_margin="0sp"
>
<TextView
android:id="@+id/restaurant_data_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:paddingBottom="2sp"
android:paddingLeft="2sp"
android:paddingRight="2sp"
android:paddingTop="6sp"
android:text=""
android:textColor="#2A4678"
android:textStyle="bold" />

<TextView
android:id="@+id/restaurant_data_direction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/restaurant_data_name"
android:paddingBottom="2sp"
android:paddingLeft="2sp"
android:paddingRight="2sp"
android:paddingTop="2sp"
android:text=""
android:textColor="#2A4678" />

<TextView
android:id="@+id/restaurant_more_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/restaurant_data_direction"
android:paddingBottom="2sp"
android:paddingLeft="2sp"
android:paddingRight="2sp"
android:paddingTop="2sp"
android:text="@string/restaurant_data_view_more_info"
android:textColor="#2A4678"
android:textSize="14sp"
android:textStyle="bold"
android:clickable="true" />


</RelativeLayout>
5 changes: 3 additions & 2 deletions res/layout/restaurants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
android:layout_marginLeft="40dip"
android:layout_marginRight="40dip"
android:clickable="true"
android:onClick="findInLocation">
android:onClick="findInLocation"
>
<TextView android:background="@android:drawable/ic_menu_mylocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -103,7 +104,7 @@
android:background="@drawable/login_text_border"
android:layout_margin="6dip"/ -->

<LinearLayout
<LinearLayout android:id="@+id/restaurant_search_direction_click_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/restaurants_search_direction_text"
Expand Down
17 changes: 17 additions & 0 deletions res/layout/restaurants_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,22 @@
android:layout_height="wrap_content"
android:layout_below="@id/restaurants_search_minimized_layout">
</ListView>

<TextView android:id="@+id/restaurants_list_maps_textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/restaurants_list_layout_click_map_view"
android:textSize="20sp"
android:paddingTop="5sp"
android:paddingBottom="5sp"
android:gravity="center"
android:textColor="#2A4678"
android:textStyle="bold"
android:background="@android:color/white"
android:alpha="0.7"
android:clickable="true"
android:onClick="changeToMapsView"
/>

</RelativeLayout>
24 changes: 21 additions & 3 deletions res/layout/restaurants_maps_layout.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<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:layout_height="match_parent"
android:background="@android:color/white">



<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
Expand All @@ -11,5 +14,20 @@
android:clickable="true"
android:apiKey="0KsFBXYtS_dmjBaMvvVbzcz-Rqvwp5ThdOdguUQ"
/>


<TextView android:id="@+id/restaurants_maps_change_list_textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/restaurants_maps_layout_clik_list_view"
android:textSize="20sp"
android:paddingTop="5sp"
android:paddingBottom="5sp"
android:gravity="center"
android:textColor="#2A4678"
android:textStyle="bold"
android:background="@android:color/white"
android:alpha="0.7"
android:clickable="true"
android:onClick="changeToListView"
/>
</RelativeLayout>
6 changes: 0 additions & 6 deletions res/menu/activity_trcard_manager_restaurant_maps.xml

This file was deleted.

2 changes: 1 addition & 1 deletion res/values-es/resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<resources>
<string name="unidId">a14fe7418ac35e6</string>
<!-- string name="dev_device">393568DA65D500EC</string -->
<string name="dev_device">353918050624655</string>
<string name="dev_device">003bb6b6e00c957f</string>
</resources>
9 changes: 9 additions & 0 deletions res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<string name="restaurants_search_direction">Calle, CP, Ciudad,&#8230;</string>
<string name="restaurants_search_restaurant">Nombre de Restaurante</string>
<string name="restaurants_search_text_button">Buscar</string>
<string name="restaurants_search_text_empty">Debes introducir una dirección</string>
<string name="restaurants_no_gps_title">GPS</string>
<string name="restaurants_no_gps_message">El GPS parece estar deshabilitado, ¿deseas habilitarlo?</string>
<string name="restaurants_no_gps_yes">Si</string>
Expand All @@ -149,9 +150,17 @@
<string name="restaurant_data_no_restaurants">No se han encontrado restaurantes</string>
<string name="restaurant_data_info">i</string>
<string name="restaurant_data_waze_text">¿Quieres que te lleve con <b>Waze</b>?</string>
<string name="restaurant_data_maps_text">Quieres llegar con <b>Google Maps</b>?</string>
<string name="restaurant_data_view_more_info">Ver más información</string>


<!-- more restaurant layout -->
<string name="more_restaurant_text">Ver más restaurantes</string>

<!-- restaurant list view -->
<string name="restaurants_list_layout_click_map_view">Toca para ver en Mapa</string>

<!-- restaurant maps view -->
<string name="restaurants_maps_layout_clik_list_view">Toca para ver en modo lista</string>

</resources>
12 changes: 9 additions & 3 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
<string name="restaurants_search_direction">Street,CP,City,&#8230;</string>
<string name="restaurants_search_restaurant">Restaurant Name</string>
<string name="restaurants_search_text_button">Search</string>
<string name="restaurants_search_text_empty">You must type a direction</string>
<string name="restaurants_no_gps_title">GPS</string>
<string name="restaurants_no_gps_message">Your GPS seems to be disabled, do you want to enable it?</string>
<string name="restaurants_no_gps_yes">Yes</string>
Expand All @@ -145,11 +146,16 @@
<string name="restaurant_data_no_restaurants">No restaurants found</string>
<string name="restaurant_data_info">i</string>
<string name="restaurant_data_waze_text">Do you want go with <b>Waze</b>?</string>
<string name="restaurant_data_maps_text">Do you want go with <b>Google Maps</b>?</string>
<string name="restaurant_data_view_more_info">View More Info</string>

<!-- more restaurant layout -->
<string name="more_restaurant_text">Show more restaurants</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_trcard_manager_restaurant_maps">TRCardManagerRestaurantMaps</string>

<!-- restaurant list view -->
<string name="restaurants_list_layout_click_map_view">Touch to view in map</string>

<!-- maps view -->
<string name="restaurants_maps_layout_clik_list_view">Touch to view in list mode</string>

</resources>
5 changes: 5 additions & 0 deletions src/com/trcardmanager/about/TRCardManagerAboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.trcardmanager.R;
import com.trcardmanager.application.TRCardManagerApplication;
import com.trcardmanager.listener.TouchElementsListener;

/**
*
Expand All @@ -34,6 +37,8 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.about_layout);
loadAppVersion();
TRCardManagerApplication.setActualActivity(this);
Button b = (Button)findViewById(R.id.about_button_opinon);
b.setOnTouchListener(new TouchElementsListener<Button>(Color.BLUE));
}


Expand Down
Loading

0 comments on commit 54cad86

Please sign in to comment.