Minor adjustments just to grab screenshots

This commit is contained in:
2020-03-01 10:30:29 +00:00
parent 934134621d
commit d70d8fb1d2
20 changed files with 557 additions and 153 deletions

View File

@@ -1,29 +1,113 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
<codeStyleSettings language="XML">
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>

1
.idea/gradle.xml generated
View File

@@ -12,6 +12,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="testRunner" value="PLATFORM" />
</GradleProjectSettings>
</option>
</component>

16
.idea/misc.xml generated
View File

@@ -5,7 +5,7 @@
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="7">
<list size="12">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
@@ -13,23 +13,33 @@
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="android.annotation.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="6">
<list size="11">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="android.annotation.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -25,6 +25,7 @@ dependencies {
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation "com.google.android.gms:play-services-location:16.0.0"
// implementation 'com.google.android.libraries.places:places-compat:2.1.0'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'

View File

@@ -17,6 +17,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").

View File

@@ -17,10 +17,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.gms.common.data.DataBufferUtils;
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
import com.google.android.gms.location.places.AutocompletePredictionBufferResponse;
import com.google.android.gms.location.places.GeoDataClient;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceBufferResponse;
@@ -46,16 +42,9 @@ import com.google.android.gms.tasks.Tasks;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import static android.content.ContentValues.TAG;
import static com.appttude.h_mal.exchangemap.MapsJsonCall.*;
import static com.google.android.gms.location.places.AutocompleteFilter.TYPE_FILTER_ADDRESS;
import static com.google.android.gms.location.places.AutocompleteFilter.TYPE_FILTER_ESTABLISHMENT;
public class FragmentMap extends Fragment implements OnMapReadyCallback {
private GoogleMap mMap;
@@ -76,7 +65,6 @@ public class FragmentMap extends Fragment implements OnMapReadyCallback {
// Inflate the layout for this fragment
View rootview = inflater.inflate(R.layout.fragment_maps, container, false);
FloatingActionButton fab = rootview.findViewById(R.id.floatingActionButton);
fab.setOnClickListener(new View.OnClickListener() {
@Override
@@ -231,35 +219,22 @@ public class FragmentMap extends Fragment implements OnMapReadyCallback {
}
@Override
protected void onPostExecute(MapItem mapItem) {
super.onPostExecute(mapItem);
protected void onPostExecute(MapItem mapItems) {
super.onPostExecute(mapItems);
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
LatLngBounds newBounds = null;
try {
ArrayList<MapItem.result> results = mapItems.getResults();
ArrayList<MapItem.result> results = mapItem.getResults();
for (MapItem.result mapItem1 : results){
boundsBuilder.include(mapItem1.getGeometry().getLocation());
for (int i=0; i <results.size(); i++){
String id = results.get(i).getPlace_id();
boundsBuilder.include(mapItem.getResults().get(i).getGeometry().getLocation());
mGeoDataClient.getPlaceById(id).addOnCompleteListener(new OnCompleteListener<PlaceBufferResponse>() {
@Override
public void onComplete(@NonNull Task<PlaceBufferResponse> task) {
if (task.isSuccessful()) {
PlaceBufferResponse places = task.getResult();
Place myPlace = places.get(0);
Log.i(TAG, "Place found: " + myPlace.getName());
mMap.addMarker(new MarkerOptions().position(myPlace.getLatLng()).title(myPlace.getName().toString()));
places.release();
} else {
Log.e(TAG, "Place not found.");
}
}
});
MarkerOptions marker = new MarkerOptions().position(
mapItem1.getGeometry().getLocation())
.title(mapItem1.getName());
mMap.addMarker(marker);
}
newBounds = boundsBuilder.build();
}catch (Exception e){
@@ -281,87 +256,4 @@ public class FragmentMap extends Fragment implements OnMapReadyCallback {
}
}
private class LocationAsyncTask extends AsyncTask<Task<AutocompletePredictionBufferResponse>, Void, AutocompletePredictionBufferResponse>{
@Override
protected AutocompletePredictionBufferResponse doInBackground(Task<AutocompletePredictionBufferResponse>... tasks) {
try {
Tasks.await(tasks[0], 60, TimeUnit.SECONDS);
} catch (ExecutionException | InterruptedException | TimeoutException e) {
e.printStackTrace();
}
return tasks[0].getResult();
}
@Override
protected void onPostExecute(AutocompletePredictionBufferResponse response) {
super.onPostExecute(response);
try {
Log.i(TAG, "Query completed. Received " + response.getCount()
+ " predictions.");
String [] ids = {"ChIJndkxNgNakWsRjHGZBzHxu8M","ChIJUcxf7YxbkWsRsndgEcBNlLQ","ChIJk-7r9ARakWsRv16cDh3GXzU","ChIJh4SRLgNakWsRuyWBDLouw-4","ChIJL533ngRakWsRUp51ucHAp5Q","ChIJy1uXvQRakWsRT6xLCK9LmzY","ChIJcTZWngRakWsRm8Cz7egsDm8","ChIJDfur3xxakWsR4WP10zl01Hg"};
for (int i=0; i <ids.length; i++){
mGeoDataClient.getPlaceById(ids[i]).addOnCompleteListener(new OnCompleteListener<PlaceBufferResponse>() {
@Override
public void onComplete(@NonNull Task<PlaceBufferResponse> task) {
if (task.isSuccessful()) {
PlaceBufferResponse places = task.getResult();
Place myPlace = places.get(0);
Log.i(TAG, "Place found: " + myPlace.getName());
mMap.addMarker(new MarkerOptions().position(myPlace.getLatLng()).title(myPlace.getName().toString()));
places.release();
} else {
Log.e(TAG, "Place not found.");
}
}
});
}
// for (int i = 0; i < response.getCount(); i++){
// final String retrievedId = response.get(i).getPlaceId();
//
// mGeoDataClient.getPlaceById(retrievedId).addOnCompleteListener(new OnCompleteListener<PlaceBufferResponse>() {
// @Override
// public void onComplete(@NonNull Task<PlaceBufferResponse> task) {
// if (task.isSuccessful()) {
// PlaceBufferResponse places = task.getResult();
// Place myPlace = places.get(0);
// Log.i(TAG, "Place found: " + myPlace.getName());
// mMap.addMarker(new MarkerOptions().position(myPlace.getLatLng()).title(myPlace.getName().toString()));
// places.release();
// } else {
// Log.e(TAG, "Place not found.");
// }
// }
// });
// }
// // Freeze the results immutable representation that can be stored safely.
// ArrayList<AutocompletePrediction> al = DataBufferUtils.freezeAndClose(response);
//
// for (AutocompletePrediction p : al) {
// CharSequence cs = p.getFullText(new CharacterStyle() {
// @Override
// public void updateDrawState(TextPaint tp) {
// mMap.addMarker(new MarkerOptions().position().title("Marker in Sydney"));
// }
// });
// Log.i(TAG, cs.toString());
// }
} catch (RuntimeExecutionException e) {
// If the query did not complete successfully return null
Log.e(TAG, "Error getting autocomplete prediction API call", e);
} finally {
mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds,0));
}
}
}
}

View File

@@ -5,6 +5,8 @@ import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -13,6 +15,8 @@ import android.widget.AutoCompleteTextView;
import android.widget.EdgeEffect;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
@@ -49,7 +53,7 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_search, container, false);
@@ -65,6 +69,7 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
@Override
public void onClick(View v) {
String myLocation = getLocationName(getContext(),getLatLong.latitude,getLatLong.longitude);
homeLocationEditText.setText(myLocation);
}
});
@@ -78,7 +83,12 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
googleApiClient = new GoogleApiClient.Builder(getContext())
.addApi(Places.GEO_DATA_API)
.addApi(Places.PLACE_DETECTION_API)
.enableAutoManage(getActivity(),this)
.enableAutoManage(getActivity(), new GoogleApiClient.OnConnectionFailedListener() {
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
Toast.makeText(getContext(), connectionResult.getErrorMessage(), Toast.LENGTH_LONG).show();
}
})
.build();
AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
@@ -93,6 +103,17 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
destinationEditText.setAdapter(mAutocompleteAdapter);
homeLocationEditText.setAdapter(mAutocompleteAdapter);
TextView submit = rootView.findViewById(R.id.submit);
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FragmentTransaction fragmentTransaction = (MapsActivity.fragmentManager).beginTransaction();
fragmentTransaction.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.replace(R.id.container,new ResultsFragment())
.addToBackStack("result").commit();
}
});
return rootView;
}

View File

@@ -16,6 +16,7 @@ import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.Toast;
@@ -82,12 +83,18 @@ public class MapsActivity extends FragmentActivity {
List<Address> list = null;
try {
list = geoCoder.getFromLocation(latitude, longitude, 1);
} catch (IOException e) {
e.printStackTrace();
}finally {
if (list != null & list.size() > 0) {
Address address = list.get(0);
result = address.getLocality();
if (result == null){
result = address.getAddressLine(0);
Log.i("MapsActivity", result);
}
}
}

View File

@@ -43,7 +43,7 @@ public class MapsJsonCall {
.appendQueryParameter("query","currency exchange")
.appendQueryParameter("location",l.latitude+","+l.longitude)
.appendQueryParameter("radius","3")
.appendQueryParameter("key","QUl6YVN5QThEZERadkc2aWhTclI1VGxrRzRGWGI2ZmZ5dDE5X1Bn");
.appendQueryParameter("key","AIzaSyA8DdDZvG6ihSrR5TlkG4FXb6ffyt19_Pg");
return builder.build().toString().replace("%2C",",").replace("%20", "+");
@@ -189,9 +189,18 @@ public class MapsJsonCall {
String place_id = currentResult.getString("place_id");
JSONObject plusCodeObject = currentResult.getJSONObject("plus_code");
PlusCode plusCode = new PlusCode(plusCodeObject.getString("compound_code"),
plusCodeObject.getString("global_code"));
PlusCode plusCode = new PlusCode("","");
try {
JSONObject plusCodeObject = currentResult.getJSONObject("plus_code");
plusCode = new PlusCode(plusCodeObject.getString("compound_code"),
plusCodeObject.getString("global_code"));
}catch (Exception e){
Log.e("json", e.getMessage());
}
Double rating = currentResult.getDouble("rating");
String reference = currentResult.getString("reference");

View File

@@ -0,0 +1,25 @@
package com.appttude.h_mal.exchangemap;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class ResultsFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_results, container, false);
return view;
}
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent"/>
<stroke android:width="2dip" android:color="#03a9f4" />
<corners android:radius="@dimen/rounding_radius"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:orientation="vertical"
tools:context=".ResultsFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="12dp"
android:orientation="vertical">
<include
android:layout_weight="1"
android:layout_height="0dp"
android:layout_width="match_parent"
layout="@layout/result_layout"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
layout="@layout/result_layout_1"/>
<include
layout="@layout/result_layout_2"/>
<include
layout="@layout/result_layout_3"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".FragmentSearch">
<LinearLayout
@@ -81,7 +82,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:text="Currency to hand"
android:text="GPB - Pound Sterling"
android:textColor="@android:color/white"
android:textSize="18sp" />
</android.support.v7.widget.CardView>
@@ -95,11 +96,23 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:text="Desired Currency"
android:text="EUR - Euro"
android:textColor="@android:color/white"
android:textSize="18sp" />
</android.support.v7.widget.CardView>
</LinearLayout>
<TextView
android:id="@+id/submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Submit"
android:textColor="@android:color/holo_blue_bright"
android:textSize="18sp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="36dp"
android:layout_marginRight="24dp"/>
</RelativeLayout>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/title"
android:layout_margin="12dp"
android:textSize="16sp"
android:text="Best Home Rate"/>
<android.support.v7.widget.CardView
android:id="@+id/submit"
style="@style/cardview_theme_standard"
android:elevation="22dp"
android:padding="3dp"
android:layout_marginBottom="3dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<TextView
android:id="@+id/result_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="3dp"
android:text="Global Exchange Ltd"
android:textColor="@android:color/black"
android:textSize="18sp" />
<TextView
android:layout_below="@id/result_name"
android:id="@+id/result_rate_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginBottom="12dp"
android:text="Exchange rate : 1.17"
android:textColor="@android:color/darker_gray"
android:textSize="18sp" />
<TextView
android:id="@+id/rate"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="12dp"
android:gravity="center"
android:textSize="26sp"
android:textStyle="bold"
android:textColor="@android:color/holo_blue_bright"
android:layout_alignBottom="@id/result_rate_desc"
android:layout_alignTop="@id/result_name"
android:text="€117.34" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Best Rate"
android:textColor="@android:color/holo_blue_bright"
android:layout_alignParentRight="true"
android:layout_marginRight="30dp"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/title"
android:layout_margin="12dp"
android:textSize="16sp"
android:text="Best Departure Rate"/>
<android.support.v7.widget.CardView
style="@style/cardview_theme_standard"
android:padding="3dp"
android:elevation="22dp"
android:layout_marginBottom="3dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/result_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="3dp"
android:text="Travelex"
android:textColor="@android:color/black"
android:textSize="18sp" />
<TextView
android:layout_below="@id/result_name"
android:id="@+id/result_rate_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginBottom="12dp"
android:text="Exchange rate : 1.13"
android:textColor="@android:color/darker_gray"
android:textSize="18sp" />
<TextView
android:id="@+id/rate"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="12dp"
android:gravity="center"
android:textSize="26sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:layout_alignBottom="@id/result_rate_desc"
android:layout_alignTop="@id/result_name"
android:text="€112.97" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/title"
android:layout_margin="12dp"
android:textSize="16sp"
android:text="Best Arrival Rate"/>
<android.support.v7.widget.CardView
style="@style/cardview_theme_standard"
android:padding="3dp"
android:elevation="22dp"
android:layout_marginBottom="3dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/result_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="3dp"
android:text="Ciaxa Bank"
android:textColor="@android:color/black"
android:textSize="18sp" />
<TextView
android:layout_below="@id/result_name"
android:id="@+id/result_rate_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginBottom="12dp"
android:text="Exchange rate : 1.14"
android:textColor="@android:color/darker_gray"
android:textSize="18sp" />
<TextView
android:id="@+id/rate"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="12dp"
android:gravity="center"
android:textSize="26sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:layout_alignBottom="@id/result_rate_desc"
android:layout_alignTop="@id/result_name"
android:text="€114.27" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/title"
android:layout_margin="12dp"
android:textSize="16sp"
android:text="Best Destination Rate"/>
<android.support.v7.widget.CardView
style="@style/cardview_theme_standard"
android:padding="3dp"
android:layout_marginBottom="3dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/result_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="3dp"
android:text="Global Exchange Ltd"
android:textColor="@android:color/black"
android:textSize="18sp" />
<TextView
android:layout_below="@id/result_name"
android:id="@+id/result_rate_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginBottom="12dp"
android:text="Exchange rate : 1.15"
android:textColor="@android:color/darker_gray"
android:textSize="18sp" />
<TextView
android:id="@+id/rate"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="12dp"
android:gravity="center"
android:textSize="26sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:layout_alignBottom="@id/result_rate_desc"
android:layout_alignTop="@id/result_name"
android:text="€115.47" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="transaction_duration">200</dimen>
<dimen name="rounding_radius">24</dimen>
</resources>

View File

@@ -18,4 +18,10 @@
<!--<item name="cardElevation">0dp</item>-->
</style>
<style name="cardview_theme_standard" parent="CardView">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="cardCornerRadius">22dp</item>
<!--<item name="cardElevation">0dp</item>-->
</style>
</resources>