mirror of
https://github.com/hmalik144/ExchangeMap.git
synced 2025-12-10 03:05:32 +00:00
Minor adjustments just to grab screenshots
This commit is contained in:
134
.idea/codeStyles/Project.xml
generated
134
.idea/codeStyles/Project.xml
generated
@@ -1,29 +1,113 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
<Objective-C-extensions>
|
<codeStyleSettings language="XML">
|
||||||
<file>
|
<arrangement>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
<rules>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
<section>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
<rule>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
<match>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
<AND>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
<NAME>xmlns:android</NAME>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
<XML_ATTRIBUTE />
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
</AND>
|
||||||
</file>
|
</match>
|
||||||
<class>
|
</rule>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
</section>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
<section>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
<rule>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
<match>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
<AND>
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
<NAME>xmlns:.*</NAME>
|
||||||
</class>
|
<XML_ATTRIBUTE />
|
||||||
<extensions>
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
<pair source="cpp" header="h" fileNamingConvention="NONE" />
|
</AND>
|
||||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
</match>
|
||||||
</extensions>
|
<order>BY_NAME</order>
|
||||||
</Objective-C-extensions>
|
</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>
|
</code_scheme>
|
||||||
</component>
|
</component>
|
||||||
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -12,6 +12,7 @@
|
|||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
|
<option name="testRunner" value="PLATFORM" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
16
.idea/misc.xml
generated
16
.idea/misc.xml
generated
@@ -5,7 +5,7 @@
|
|||||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||||
<option name="myNullables">
|
<option name="myNullables">
|
||||||
<value>
|
<value>
|
||||||
<list size="7">
|
<list size="12">
|
||||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
<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="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||||
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
<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="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||||
<item index="5" class="java.lang.String" itemvalue="androidx.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="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>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
<option name="myNotNulls">
|
<option name="myNotNulls">
|
||||||
<value>
|
<value>
|
||||||
<list size="6">
|
<list size="11">
|
||||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
<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="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="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="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||||
<item index="4" class="java.lang.String" itemvalue="androidx.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="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>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal 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>
|
||||||
@@ -25,6 +25,7 @@ dependencies {
|
|||||||
implementation 'com.google.android.gms:play-services-maps:16.0.0'
|
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-places:16.0.0'
|
||||||
implementation "com.google.android.gms:play-services-location: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'
|
implementation 'com.android.support:support-v4:28.0.0'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
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.
|
The API key for Google Maps-based APIs is defined as a string resource.
|
||||||
(See the file "res/values/google_maps_api.xml").
|
(See the file "res/values/google_maps_api.xml").
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
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.GeoDataClient;
|
||||||
import com.google.android.gms.location.places.Place;
|
import com.google.android.gms.location.places.Place;
|
||||||
import com.google.android.gms.location.places.PlaceBufferResponse;
|
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.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
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.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 {
|
public class FragmentMap extends Fragment implements OnMapReadyCallback {
|
||||||
|
|
||||||
private GoogleMap mMap;
|
private GoogleMap mMap;
|
||||||
@@ -76,7 +65,6 @@ public class FragmentMap extends Fragment implements OnMapReadyCallback {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
View rootview = inflater.inflate(R.layout.fragment_maps, container, false);
|
View rootview = inflater.inflate(R.layout.fragment_maps, container, false);
|
||||||
|
|
||||||
|
|
||||||
FloatingActionButton fab = rootview.findViewById(R.id.floatingActionButton);
|
FloatingActionButton fab = rootview.findViewById(R.id.floatingActionButton);
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -231,35 +219,22 @@ public class FragmentMap extends Fragment implements OnMapReadyCallback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(MapItem mapItem) {
|
protected void onPostExecute(MapItem mapItems) {
|
||||||
super.onPostExecute(mapItem);
|
super.onPostExecute(mapItems);
|
||||||
|
|
||||||
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
|
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
|
||||||
LatLngBounds newBounds = null;
|
LatLngBounds newBounds = null;
|
||||||
|
|
||||||
try {
|
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++){
|
MarkerOptions marker = new MarkerOptions().position(
|
||||||
String id = results.get(i).getPlace_id();
|
mapItem1.getGeometry().getLocation())
|
||||||
boundsBuilder.include(mapItem.getResults().get(i).getGeometry().getLocation());
|
.title(mapItem1.getName());
|
||||||
|
mMap.addMarker(marker);
|
||||||
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.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
newBounds = boundsBuilder.build();
|
newBounds = boundsBuilder.build();
|
||||||
}catch (Exception e){
|
}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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import android.net.Uri;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.Fragment;
|
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.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -13,6 +15,8 @@ import android.widget.AutoCompleteTextView;
|
|||||||
import android.widget.EdgeEffect;
|
import android.widget.EdgeEffect;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
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.ConnectionResult;
|
||||||
import com.google.android.gms.common.api.GoogleApiClient;
|
import com.google.android.gms.common.api.GoogleApiClient;
|
||||||
@@ -49,7 +53,7 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
View rootView = inflater.inflate(R.layout.fragment_search, container, false);
|
View rootView = inflater.inflate(R.layout.fragment_search, container, false);
|
||||||
@@ -65,6 +69,7 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
String myLocation = getLocationName(getContext(),getLatLong.latitude,getLatLong.longitude);
|
String myLocation = getLocationName(getContext(),getLatLong.latitude,getLatLong.longitude);
|
||||||
|
|
||||||
homeLocationEditText.setText(myLocation);
|
homeLocationEditText.setText(myLocation);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -78,7 +83,12 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
|
|||||||
googleApiClient = new GoogleApiClient.Builder(getContext())
|
googleApiClient = new GoogleApiClient.Builder(getContext())
|
||||||
.addApi(Places.GEO_DATA_API)
|
.addApi(Places.GEO_DATA_API)
|
||||||
.addApi(Places.PLACE_DETECTION_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();
|
.build();
|
||||||
|
|
||||||
AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
|
AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
|
||||||
@@ -93,6 +103,17 @@ public class FragmentSearch extends Fragment implements GoogleApiClient.OnConnec
|
|||||||
destinationEditText.setAdapter(mAutocompleteAdapter);
|
destinationEditText.setAdapter(mAutocompleteAdapter);
|
||||||
homeLocationEditText.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;
|
return rootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import android.support.v4.app.FragmentActivity;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@@ -82,12 +83,18 @@ public class MapsActivity extends FragmentActivity {
|
|||||||
List<Address> list = null;
|
List<Address> list = null;
|
||||||
try {
|
try {
|
||||||
list = geoCoder.getFromLocation(latitude, longitude, 1);
|
list = geoCoder.getFromLocation(latitude, longitude, 1);
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally {
|
}finally {
|
||||||
if (list != null & list.size() > 0) {
|
if (list != null & list.size() > 0) {
|
||||||
|
|
||||||
Address address = list.get(0);
|
Address address = list.get(0);
|
||||||
result = address.getLocality();
|
result = address.getLocality();
|
||||||
|
if (result == null){
|
||||||
|
result = address.getAddressLine(0);
|
||||||
|
Log.i("MapsActivity", result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MapsJsonCall {
|
|||||||
.appendQueryParameter("query","currency exchange")
|
.appendQueryParameter("query","currency exchange")
|
||||||
.appendQueryParameter("location",l.latitude+","+l.longitude)
|
.appendQueryParameter("location",l.latitude+","+l.longitude)
|
||||||
.appendQueryParameter("radius","3")
|
.appendQueryParameter("radius","3")
|
||||||
.appendQueryParameter("key","QUl6YVN5QThEZERadkc2aWhTclI1VGxrRzRGWGI2ZmZ5dDE5X1Bn");
|
.appendQueryParameter("key","AIzaSyA8DdDZvG6ihSrR5TlkG4FXb6ffyt19_Pg");
|
||||||
|
|
||||||
return builder.build().toString().replace("%2C",",").replace("%20", "+");
|
return builder.build().toString().replace("%2C",",").replace("%20", "+");
|
||||||
|
|
||||||
@@ -189,9 +189,18 @@ public class MapsJsonCall {
|
|||||||
|
|
||||||
|
|
||||||
String place_id = currentResult.getString("place_id");
|
String place_id = currentResult.getString("place_id");
|
||||||
JSONObject plusCodeObject = currentResult.getJSONObject("plus_code");
|
|
||||||
PlusCode plusCode = new PlusCode(plusCodeObject.getString("compound_code"),
|
PlusCode plusCode = new PlusCode("","");
|
||||||
plusCodeObject.getString("global_code"));
|
|
||||||
|
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");
|
Double rating = currentResult.getDouble("rating");
|
||||||
String reference = currentResult.getString("reference");
|
String reference = currentResult.getString("reference");
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
7
app/src/main/res/drawable/outline.xml
Normal file
7
app/src/main/res/drawable/outline.xml
Normal 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>
|
||||||
37
app/src/main/res/layout/fragment_results.xml
Normal file
37
app/src/main/res/layout/fragment_results.xml
Normal 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>
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:context=".FragmentSearch">
|
tools:context=".FragmentSearch">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="12dp"
|
android:layout_margin="12dp"
|
||||||
android:text="Currency to hand"
|
android:text="GPB - Pound Sterling"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
@@ -95,11 +96,23 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="12dp"
|
android:layout_margin="12dp"
|
||||||
android:text="Desired Currency"
|
android:text="EUR - Euro"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</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>
|
</RelativeLayout>
|
||||||
78
app/src/main/res/layout/result_layout.xml
Normal file
78
app/src/main/res/layout/result_layout.xml
Normal 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>
|
||||||
69
app/src/main/res/layout/result_layout_1.xml
Normal file
69
app/src/main/res/layout/result_layout_1.xml
Normal 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>
|
||||||
69
app/src/main/res/layout/result_layout_2.xml
Normal file
69
app/src/main/res/layout/result_layout_2.xml
Normal 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>
|
||||||
65
app/src/main/res/layout/result_layout_3.xml
Normal file
65
app/src/main/res/layout/result_layout_3.xml
Normal 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>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="transaction_duration">200</dimen>
|
<dimen name="transaction_duration">200</dimen>
|
||||||
|
<dimen name="rounding_radius">24</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -18,4 +18,10 @@
|
|||||||
<!--<item name="cardElevation">0dp</item>-->
|
<!--<item name="cardElevation">0dp</item>-->
|
||||||
</style>
|
</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>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user