Commit 303595d3 authored by A.P.R.C. Abeyrathna's avatar A.P.R.C. Abeyrathna

Research Completed

parent 046d6cd9
Dipature,Arrival,Time
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala,Fort ,25min
Dehiwala,wellawatte,5min
Dehiwala,bambalapitiya,9min
Dehiwala,kollupitiya,13min
Dehiwala,kompannavidiya,16min
wellawatte,bambalapitiya,4min
wellawatte,kollupitiya,8min
wellawatte,kompannavidiya,11min
wellawatte,Fort ,13min
bambalapitiya,kollupitiya,4min
bambalapitiya,kompannavidiya,7min
bambalapitiya,Fort ,9min
kollupitiya,kompannavidiya,3min
kollupitiya,Fort ,5min
kompannavidiya,Fort ,3min
Dehiwala 1
wellawatte 2
bambalapitiya 3
kollupitiya 4
kompannavidiya 5
Fort 6
# %%
import pandas as pd
# %%
data = pd.read_csv('TravelTimePrediction\TrainData\TrainData.csv')
# %%
# %%
# %%
# %%
data['Dipature'].map({'Dehiwala':1,'wellawatte':2,'bambalapitiya':3,'kollupitiya':4,'kompannavidiya':5})
# %%
data['Dipature'] = data['Dipature'].map({'Dehiwala':1,'wellawatte':2,'bambalapitiya':3,'kollupitiya':4,'kompannavidiya':5})
# %%
# %%
data['Arrival'].map({'Fort ':6,'wellawatte':2,'bambalapitiya':3,'kollupitiya':4,'kompannavidiya':5})
# %%
data['Arrival'] = data['Arrival'].map({'Fort ':6,'wellawatte':2,'bambalapitiya':3,'kollupitiya':4,'kompannavidiya':5})
# %%
# %%
X = data.drop(['Time'],axis=1)
# %%
y = data['Time']
# %%
from sklearn.model_selection import train_test_split
# %%
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.2,random_state=42)
# %%
from sklearn.neural_network import MLPClassifier
# %%
NN = MLPClassifier()
NN.fit(X_train,y_train)
# %%
y_pred1 = NN.predict(X_test)
# %%
df1 = pd.DataFrame({'Actual':y_test, 'NN Results':y_pred1})
# %%
data = {'Dipature':1,
'Arrival':2,
}
df = pd.DataFrame(data,index=[0])
# %%
predit = NN.predict(df)
# %%
def GetTrainPrediction(Dipature,Arrival):
data = {'Dipature':Dipature,
'Arrival':Arrival,
}
df = pd.DataFrame(data,index=[0])
predit = NN.predict(df)
print('Train Travel Time Prediction :- ',*predit,' ')
# %%
def GetDipatureCode(data):
if('Dehiwala' == data):
return 1
elif('wellawatte' == data):
return 2
elif('bambalapitiya' == data):
return 3
elif('kollupitiya' == data):
return 4
elif('kompannavidiya' == data):
return 5
# %%
def GetArrivalCode(data):
if('Fort' == data):
return 6
elif('wellawatte' == data):
return 2
elif('bambalapitiya' == data):
return 3
elif('kollupitiya' == data):
return 4
elif('kompannavidiya' == data):
return 5
# %%
def GetPrediction(Dvalue,Avalue):
Dipature = GetDipatureCode(Dvalue)
Arrival = GetArrivalCode(Avalue)
GetTrainPrediction(Dipature,Arrival)
GetPrediction('Dehiwala','Fort')
\ No newline at end of file
......@@ -25,11 +25,18 @@ android {
python{
pip{
install "numpy"
install "pandas"
install "matplotlib"
install "sklearn"
install "matplotlib"
install "scikit-learn"
install "networkx"
install "asyncio"
}
}
......@@ -44,7 +51,7 @@ android {
buildPython "C:/Users/Chamod Abeyrathna/AppData/Local/Programs/Python/Python39/python.exe"
}
python {
version "3.9"
version "3.8"
}
sourceSets {
main {
......
......@@ -76,7 +76,6 @@
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -90,6 +89,8 @@
android:name=".RouteActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
......
......@@ -6,12 +6,14 @@ import androidx.core.app.ActivityCompat;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Color;
import android.location.Location;
import android.os.Bundle;
import android.text.Editable;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
......@@ -28,17 +30,22 @@ import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MapStyleOptions;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.Polyline;
import com.google.android.gms.maps.model.PolylineOptions;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.chaquo.python.PyObject;
import com.chaquo.python.Python;
import com.chaquo.python.android.AndroidPlatform;
import java.util.HashMap;
import java.util.Map;
public class InitialMap extends AppCompatActivity {
private AutoCompleteTextView editText;
private static final String[] CITIES = new String[]{
"Viharamahadevi Park","House Of Fashion","Castle Street","Rajagiriya","HSBC Rajagiriya","Ethulkotte New","Parliament Junction","Battaramulla Junction","Ganahena","Koswatta","Kotte-Bope"
,"Thalahena Junction","Malabe","Fort_TR","Kompannavidiya_TR","Kollupitiya_TR","Bambalapitiya_TR","Wellawatte_TR","Dehiwala_TR"
......@@ -47,6 +54,11 @@ public class InitialMap extends AppCompatActivity {
SupportMapFragment supportMapFragment;
FusedLocationProviderClient client;
GoogleMap map;
TextView textView;
Button findBtn;
Double Longi;
Double Lati;
ProgressDialog pd;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -55,14 +67,23 @@ public class InitialMap extends AppCompatActivity {
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
getSupportActionBar().hide();
setContentView(R.layout.activity_initial_map);
pd = new ProgressDialog(this);
//find button function
findBtn = findViewById(R.id.findbus);
//id selecting
textView = findViewById(R.id.current_location);
//Where to declaration
AutoCompleteTextView editText = findViewById(R.id.where_to);
editText = findViewById(R.id.where_to);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this , android.R.layout.simple_list_item_1, CITIES);
editText.setAdapter(adapter);
//Assign variable
supportMapFragment = (SupportMapFragment) getSupportFragmentManager()
......@@ -77,20 +98,54 @@ public class InitialMap extends AppCompatActivity {
//When granted
//Call method
getCurrentLocation();
}
else{
//When denied request permission
ActivityCompat.requestPermissions(InitialMap.this,
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},44);
}
}
public void btnRetrieveLocation(View view) {
startActivity(new Intent(getApplicationContext(),RetrieveBusMap.class));
findBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//set title of progress dialog
String value = editText.getText().toString();
String valu2 = textView.getText().toString();
String locationOne = textView.getText().toString();//start location
String locationTwo = editText.getText().toString();//end location
int travelTime = GetTravelTime(locationOne,locationTwo);
int ArrivalValue = GetStationID(locationTwo);
startActivity(new Intent(InitialMap.this, RouteActivity.class)
.putExtra("key", 79.95430199947661)
.putExtra("rname", 6.903962700873259)
.putExtra("TimePrediction", travelTime)
.putExtra("EndLocation", ArrivalValue)
);
}
});
}
private void getCurrentLocation() {
//Initialize task location
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
......@@ -101,6 +156,8 @@ public class InitialMap extends AppCompatActivity {
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
Task<Location> task = client.getLastLocation();
......@@ -117,6 +174,14 @@ public class InitialMap extends AppCompatActivity {
//Initialize lat lan
LatLng latLng = new LatLng(location.getLatitude(),
location.getLongitude());
Longi=location.getLongitude();
Lati=location.getLatitude();
System.out.println("Longi :- "+Longi +" Lat:- "+Lati);
textView.setText(""+GetCurrentLocationName(Longi,Lati));
//Create marker
MarkerOptions options = new MarkerOptions()
.position(latLng)
......@@ -124,10 +189,6 @@ public class InitialMap extends AppCompatActivity {
.title("You are here");
//Zoom map
googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 18));
//Add marker
......@@ -149,6 +210,7 @@ public class InitialMap extends AppCompatActivity {
}
});
}
}
});
}
......@@ -166,4 +228,115 @@ public class InitialMap extends AppCompatActivity {
}
}
}
public String GetCurrentLocationName(Double longi,Double lat){
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
Python py = Python.getInstance();
PyObject pyobj = py.getModule("AL");
PyObject obj = pyobj.callAttr("get_nearest_station",lat,longi);
PyObject obj2 = pyobj.callAttr("get_route",1,2,3);
//semina function call and get the current location name
return obj.toString();
}
public int GetStationID(String name){
// Create a HashMap object called capitalCities
HashMap<String, Integer> capitalCities = new HashMap<String, Integer>();
// Add keys and values (name,value)
capitalCities.put("Kollupitiya", 0);
capitalCities.put("Viharamahadevi Park", 1);
capitalCities.put("House Of Fashion", 2);
capitalCities.put("Castle Street", 3);
capitalCities.put("Rajagiriya", 4);
capitalCities.put("HSBC Rajagiriya", 5);
capitalCities.put("Ethulkotte New", 6);
capitalCities.put("Parliament Junction", 7);
capitalCities.put("Battaramulla Junction", 8);
capitalCities.put("Ganahena", 9);
capitalCities.put("Koswatta", 10);
capitalCities.put("Kotte-Bope", 11);
capitalCities.put("Thalahena Junction", 12);
capitalCities.put("Malabe", 13);
capitalCities.put("Fort_TR", 14);
capitalCities.put("Kompannavidiya_TR", 15);
capitalCities.put("Kollupitiya_TR", 16);
capitalCities.put("Bambalapitiya_TR", 17);
capitalCities.put("Wellawatte_TR", 18);
capitalCities.put("Dehiwala_TR", 19);
int val = capitalCities.get(name);
return val;
}
public int GetTravelTime(String StartLocation,String EndLocation){
int time=0;
if(StartLocation.equals("Malabe")){
if(EndLocation.equals("Koswatta")){
time = 20;
}
else if(EndLocation.equals("Kollupitiya")){
time = 58;
}
else if(EndLocation.equals("Viharamahadevi Park")){
time = 56;
}
else if(EndLocation.equals("House Of Fashion")){
time = 44;
}
else if(EndLocation.equals("Castle Street")){
time = 41;
}
else if(EndLocation.equals("Rajagiriya")){
time = 43;
}
else if(EndLocation.equals("HSBC Rajagiriya")){
time = 42;
}
else if(EndLocation.equals("Ethulkotte New")){
time = 34;
}
else if(EndLocation.equals("Parliaent Junction")){
time = 31;
}
else if(EndLocation.equals("Battaramulla Junction")){
time = 28;
}
else if(EndLocation.equals("Ganahena")){
time = 26;
}
else if(EndLocation.equals("Kotte-Bope")){
time = 20;
}
else if(EndLocation.equals("Thalahena Junction")){
time = 15;
}
}else{
}
return time;
}
}
......@@ -2,6 +2,7 @@ package com.app.travelle;
import androidx.appcompat.app.AppCompatActivity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
......@@ -13,6 +14,7 @@ public class Login extends AppCompatActivity {
private Button login_btn;
private Button direct_to_signup_btn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -21,6 +23,8 @@ public class Login extends AppCompatActivity {
getSupportActionBar().hide();
setContentView(R.layout.activity_login);
login_btn = (Button) findViewById(R.id.login);
direct_to_signup_btn = (Button) findViewById(R.id.signup);
......@@ -38,7 +42,6 @@ public class Login extends AppCompatActivity {
});
}
public void openWelcome(){
Toast.makeText(this, "This is from login", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this, InitialMap.class);
startActivity(intent);
}
......
......@@ -38,13 +38,7 @@ public class MainActivity extends AppCompatActivity {
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
Python py = Python.getInstance();
PyObject pyobj = py.getModule("AL");
//PyObject obj = pyobj.callAttr("get_nearest_station",6.902641300889514, 79.89708871696563);
PyObject obj = pyobj.callAttr("main",1,2,6);
System.out.println(obj.toString());
}
public void openLogin(){
Intent intent = new Intent(this, Login.class);
......
#from asyncio.windows_events import NULL
from cmath import inf
from tokenize import ContStr
#from turtle import distance
from helpers import load_map_test, load_map_bus, load_map_train,route_177,route_176,route_8717
from math import radians, cos, sin, asin, sqrt
import json
class PathPlanner():
......@@ -212,14 +212,14 @@ class PathPlanner():
#self.dis = dist
return dist
def get_traveled_distance(self):
# def get_traveled_distance(self):
#traveled_distance
lastNode = self.start
for n in self.path[1:]:
self.range += distance(lastNode, n )
lastNode = n
return self.range
# #traveled_distance
# lastNode = self.start
# for n in self.path[1:]:
# self.range = range + distance(self,lastNode, n)
# lastNode = n
# return self.range
def get_fare(self,path):
......@@ -247,7 +247,7 @@ class PathPlanner():
# Get route
def main( val, start, destination):
def get_route( val, start, destination):
if val == 3:
map = load_map_train()
elif val == 2:
......@@ -258,11 +258,43 @@ def main( val, start, destination):
planner = PathPlanner(map,start,destination)
#print(map.roads)
path = planner.path
print(type(path))
if path == False:
print("No path Found ")
return False
else:
# print('path = ' ,path)
#dist = planner.get_traveled_distance()/10
dist =10
# print('distance = ' , dist)
fare = planner.get_fare(path)
# print('trip RS.' , fare)
# return path
#data = dict()
data = []
data.append(fare)
for each in path:
data.append(map.intersections[each])
#print(type(data))
return data
# for each in path:
# data[each] = list()
#raw = {map.intersections[each],map.name[each],map.routeNo[each],map.type[each]}
# jsonData=json.dumps(data)
#
# data[each].extend(raw)
#
# route = json.dumps(data)
#
#
# return route,dist,fare
return path
#>>>>>>>>>>>>>>>>>>>>>
......@@ -297,7 +329,7 @@ def test1(typ,start,stop1,stop2,stop3):
raise ValueError("No path found for planner")
path1.extend(path2)
print(path1)
else:
planner2 = PathPlanner(map,stop1,stop2)
path2 = planner2.path
......@@ -311,33 +343,33 @@ def test1(typ,start,stop1,stop2,stop3):
path1.extend(path2 + path3)
print (path1)
def get_nearest_station(lon,lat):
map = load_map_test()
tempDist = float(inf)
tempDist = float('inf')
nearestStation = None
lon1 = radians(lon)
lat1 = radians(lat)
for node in map.intersections.keys():
lon2 = radians(map.intersections [node][0])
lat2 = radians(map.intersections [node][1])
# Haversine formula
dlon = lon2 - lon1
dlat = lat2 - lat1
a = sin(dlat / 2)**2 + cos(lat1) * cos(lat2) * sin(dlon / 2)**2
c = 2 * asin(sqrt(a))
# Radius of earth in kilometers
r = 6371
# calculate the result
dist = (c * r)
......@@ -345,11 +377,10 @@ def get_nearest_station(lon,lat):
tempDist = dist
nearestStation = map.name[node]
return nearestStation
#<<<<<<<<<<<<<<<<<
#main( 1, 14, 15)
#print(get_route( 1, 14, 15) )
#>>>>>>>>>>>>>>
#test1(1,2,3,14,18)
......
......@@ -2,8 +2,10 @@
import pandas as pd
# %%
data = pd.read_csv('TravelTimePrediction\BusTravelData.csv')
#data = pd.read_csv('../TravelTimePrediction\BusTravelData.csv')
from os.path import dirname, join
filename = join(dirname(__file__), "BusTravelData.csv")
data = pd.read_csv(filename)
# %%
data['Day'].unique()
......@@ -36,6 +38,8 @@ X = data.drop(['Date','Travel Time'],axis=1)
# %%
y = data['Travel Time']
print("Python printing")
# %% [markdown]
# Train/test split
......
......@@ -51,7 +51,7 @@ map_test = {
4: {'pos': (6.908462881966912, 79.89338919261249), 'connections': [3,5], 'name' : 'Rajagiriya', 'type': 0, 'routeNo': 177, 'hValue': 1},
5: {'pos': (6.906663916178293, 79.90205413217801), 'connections': [4,6], 'name' : 'HSBC Rajagiriya', 'type': 0, 'routeNo': 177, 'hValue': 1},
6: {'pos': (6.90333333857459, 79.90747047529919), 'connections': [5,7], 'name' : 'Ethulkotte New', 'type': 0, 'routeNo': 177, 'hValue': 1},
7: {'pos': (6.903185701293392, 79.91168232658337), 'connections': [6,8], 'name' : 'Parliament Junction', 'type': 0, 'routeNo': 177, 'hValue': 1},
7: {'pos': (6.903185701293392, 79.91168232658337), 'connections': [6,8], 'name' : 'Parliaent Junction', 'type': 0, 'routeNo': 177, 'hValue': 1},
8: {'pos': (6.902102452411621, 79.91741047710077), 'connections': [7,9], 'name' : 'Battaramulla Junction', 'type': 0, 'routeNo': 177, 'hValue': 1},
9: {'pos': (6.90431022366131, 79.92400480782847), 'connections': [8,10], 'name' : 'Ganahena', 'type': 0, 'routeNo': 177, 'hValue': 1},
10: {'pos': (6.906173952520986, 79.92862087153598), 'connections': [9,11], 'name' : 'Koswatta', 'type': 0, 'routeNo': 177, 'hValue': 1},
......
......@@ -13,49 +13,49 @@
android:id="@+id/maps_section"
android:name="com.google.android.gms.maps.SupportMapFragment"/>
<!-- <com.google.android.material.textfield.TextInputLayout
android:id="@+id/search_destination"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="340dp"
android:layout_height="70dp"
android:layout_marginStart="30dp"
android:layout_marginTop="260dp"
app:boxBackgroundColor="#FFFFFF"
app:boxCornerRadiusBottomEnd="60px"
app:boxCornerRadiusBottomStart="60px"
app:boxCornerRadiusTopEnd="60px"
app:boxCornerRadiusTopStart="60px"
app:boxStrokeColor="#FFFFFF"
app:endIconMode="clear_text"
app:startIconTint="@color/white"
app:endIconTint="#FFFFFF"
android:shadowColor="#000000"
android:shadowDx="1.2"
android:shadowDy="1.2"
android:shadowRadius="1.5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/sans_bold"
android:hint="Where to?" />
</com.google.android.material.textfield.TextInputLayout> -->
<ImageView
android:id="@+id/imageView10"
android:layout_width="508dp"
android:layout_height="297dp"
android:layout_marginStart="-60dp"
android:layout_marginTop="572dp"
android:layout_marginTop="520dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/rectangle_16" />
<!-- <com.google.android.material.textfield.TextInputLayout
android:id="@+id/search_destination"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="340dp"
android:layout_height="70dp"
android:layout_marginStart="30dp"
android:layout_marginTop="260dp"
app:boxBackgroundColor="#FFFFFF"
app:boxCornerRadiusBottomEnd="60px"
app:boxCornerRadiusBottomStart="60px"
app:boxCornerRadiusTopEnd="60px"
app:boxCornerRadiusTopStart="60px"
app:boxStrokeColor="#FFFFFF"
app:endIconMode="clear_text"
app:startIconTint="@color/white"
app:endIconTint="#FFFFFF"
android:shadowColor="#000000"
android:shadowDx="1.2"
android:shadowDy="1.2"
android:shadowRadius="1.5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/sans_bold"
android:hint="Where to?" />
</com.google.android.material.textfield.TextInputLayout> -->
<Button
android:id="@+id/findbus"
android:layout_width="124dp"
......@@ -63,7 +63,6 @@
android:layout_marginStart="140dp"
android:layout_marginBottom="16dp"
android:backgroundTint="#262730"
android:onClick="btnRetrieveLocation"
android:text="FIND "
app:cornerRadius="60px"
android:textSize="60px"
......@@ -96,18 +95,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<AutoCompleteTextView
<TextView
android:id="@+id/current_location"
android:layout_width="340dp"
android:layout_height="59dp"
android:layout_marginStart="32dp"
android:layout_marginBottom="30dp"
android:hint="Where to"
android:fontFamily="@font/sans_bold"
android:layout_marginBottom="10dp"
android:fontFamily="@font/sans_italic"
android:textSize="19dp"
android:gravity="center"
android:textColorHint="@drawable/selector"
android:textAlignment="center"
android:completionThreshold="1"
android:completionHint="Select a city"
android:background="@drawable/rounded_corner"
app:layout_constraintBottom_toTopOf="@+id/where_to"
app:layout_constraintStart_toStartOf="parent" />
......@@ -117,7 +115,7 @@
android:layout_width="340dp"
android:layout_height="59dp"
android:layout_marginStart="32dp"
android:layout_marginBottom="30dp"
android:layout_marginBottom="20dp"
android:hint="Where to"
android:fontFamily="@font/sans_bold"
android:textColorHint="@drawable/selector"
......@@ -125,9 +123,9 @@
android:completionThreshold="1"
android:completionHint="Select a city"
android:background="@drawable/rounded_corner"
app:layout_constraintBottom_toTopOf="@+id/findbus"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment