Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
5
5711403296
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paded
5711403296
Commits
396711c0
Commit
396711c0
authored
Jan 24, 2018
by
Paded
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add return button
parent
7959a8fa
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
131 additions
and
51 deletions
+131
-51
build_file_checksums.ser
.idea/caches/build_file_checksums.ser
+0
-0
build.gradle
app/build.gradle
+1
-0
MainActivity.java
...ansitdriver/paded/com/ubontransitdriver/MainActivity.java
+93
-27
TrackerService3.java
...itdriver/paded/com/ubontransitdriver/TrackerService3.java
+3
-0
bg_btn_activebus_clicked.xml
app/src/main/res/drawable/bg_btn_activebus_clicked.xml
+1
-1
bg_btn_activebus_normal.xml
app/src/main/res/drawable/bg_btn_activebus_normal.xml
+5
-5
bg_endtrip_bus_clicked.xml
app/src/main/res/drawable/bg_endtrip_bus_clicked.xml
+1
-1
bg_endtrip_bus_normal.xml
app/src/main/res/drawable/bg_endtrip_bus_normal.xml
+5
-5
bg_return_bus_clicked.xml
app/src/main/res/drawable/bg_return_bus_clicked.xml
+1
-1
bg_return_bus_normal.xml
app/src/main/res/drawable/bg_return_bus_normal.xml
+5
-1
ic_arrows.xml
app/src/main/res/drawable/ic_arrows.xml
+5
-0
ic_close.xml
app/src/main/res/drawable/ic_close.xml
+1
-1
bottom_sheet_endtrip.xml
app/src/main/res/layout/bottom_sheet_endtrip.xml
+2
-2
main_layout.xml
app/src/main/res/layout/main_layout.xml
+7
-7
colors.xml
app/src/main/res/values/colors.xml
+1
-0
No files found.
.idea/caches/build_file_checksums.ser
View file @
396711c0
No preview for this file type
app/build.gradle
View file @
396711c0
...
@@ -33,6 +33,7 @@ dependencies {
...
@@ -33,6 +33,7 @@ dependencies {
compile
'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'
compile
'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'
compile
'com.loopeer.lib:shadow:0.0.4-beta1'
compile
'com.loopeer.lib:shadow:0.0.4-beta1'
compile
'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile
'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile
'com.elyeproj.libraries:loaderviewlibrary:1.3.0'
}
}
apply
plugin:
'com.google.gms.google-services'
apply
plugin:
'com.google.gms.google-services'
app/src/main/java/ubontransitdriver/paded/com/ubontransitdriver/MainActivity.java
View file @
396711c0
...
@@ -41,7 +41,7 @@ public class MainActivity extends AppCompatActivity {
...
@@ -41,7 +41,7 @@ public class MainActivity extends AppCompatActivity {
private
ProgressBar
progressBar
;
private
ProgressBar
progressBar
;
private
Button
btn_endtrip
,
btn_endtrip_cancel
,
btn_active_bus
,
btn_return
,
btn_endtrip_yes
;
private
Button
btn_endtrip
,
btn_endtrip_cancel
,
btn_active_bus
,
btn_return
,
btn_endtrip_yes
;
// private Boolean user_status = true;
// private Boolean user_status = true;
private
TextView
txt_user_status_on
,
txt_user_status_off
;
private
TextView
txt_user_status_on
,
txt_user_status_off
,
txt_stop
,
txt_start
;
BottomSheetDialog
bottomSheetDialog
;
BottomSheetDialog
bottomSheetDialog
;
BottomSheetBehavior
bottomSheetBehavior
;
BottomSheetBehavior
bottomSheetBehavior
;
private
FrameLayout
view_cover
;
private
FrameLayout
view_cover
;
...
@@ -51,6 +51,11 @@ public class MainActivity extends AppCompatActivity {
...
@@ -51,6 +51,11 @@ public class MainActivity extends AppCompatActivity {
String
bus_id
;
String
bus_id
;
String
user_status
;
String
user_status
;
String
user_id
;
String
user_id
;
String
start_busstop
;
String
stop_busstop
;
int
k
=
0
;
NotificationManager
mNotificationManager
;
NotificationManager
mNotificationManager
;
...
@@ -61,7 +66,7 @@ public class MainActivity extends AppCompatActivity {
...
@@ -61,7 +66,7 @@ public class MainActivity extends AppCompatActivity {
auth
=
FirebaseAuth
.
getInstance
();
auth
=
FirebaseAuth
.
getInstance
();
FirebaseUser
user
=
auth
.
getCurrentUser
();
final
FirebaseUser
user
=
auth
.
getCurrentUser
();
progressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
progressBar
);
progressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
progressBar
);
...
@@ -72,6 +77,9 @@ public class MainActivity extends AppCompatActivity {
...
@@ -72,6 +77,9 @@ public class MainActivity extends AppCompatActivity {
btn_active_bus
=
(
Button
)
findViewById
(
R
.
id
.
btn_active_bus
);
btn_active_bus
=
(
Button
)
findViewById
(
R
.
id
.
btn_active_bus
);
btn_return
=
(
Button
)
findViewById
(
R
.
id
.
btn_return
);
btn_return
=
(
Button
)
findViewById
(
R
.
id
.
btn_return
);
txt_start
=
(
TextView
)
findViewById
(
R
.
id
.
txt_start
);
txt_stop
=
(
TextView
)
findViewById
(
R
.
id
.
txt_stop
);
// view_cover = (FrameLayout) findViewById(R.id.view_cover);
// view_cover = (FrameLayout) findViewById(R.id.view_cover);
progressBar
.
setVisibility
(
View
.
VISIBLE
);
progressBar
.
setVisibility
(
View
.
VISIBLE
);
...
@@ -99,14 +107,61 @@ public class MainActivity extends AppCompatActivity {
...
@@ -99,14 +107,61 @@ public class MainActivity extends AppCompatActivity {
bus_id
=
dataSnapshot
.
child
(
"bus_id"
).
getValue
(
String
.
class
);
bus_id
=
dataSnapshot
.
child
(
"bus_id"
).
getValue
(
String
.
class
);
user_id
=
user
.
getUid
();
user_id
=
user
.
getUid
();
DatabaseReference
keyReference
=
FirebaseDatabase
.
getInstance
().
getReference
().
child
(
"allbus/"
+
bus_id
+
"/bus_stop"
);
keyReference
.
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
String
string
=
dataSnapshot
.
getValue
(
String
.
class
);
String
[]
bus_stop
=
string
.
split
(
","
);
int
bus_stop_size
=
bus_stop
.
length
;
String
start_stop_busstop
[]
=
new
String
[
2
];
start_stop_busstop
[
0
]
=
bus_stop
[
0
];
start_stop_busstop
[
1
]
=
bus_stop
[
bus_stop_size
-
1
];
for
(
int
i
=
0
;
i
<
start_stop_busstop
.
length
;
i
++)
{
k
=
0
;
DatabaseReference
keyReference
=
FirebaseDatabase
.
getInstance
().
getReference
().
child
(
"all_busstop/"
+
start_stop_busstop
[
i
]);
keyReference
.
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
Log
.
d
(
TAG
,
"onDataChange: "
+
dataSnapshot
.
child
(
"nameEN"
).
getValue
(
String
.
class
));
if
(
k
==
0
)
{
start_busstop
=
dataSnapshot
.
child
(
"nameEN"
).
getValue
(
String
.
class
);
txt_start
.
setText
(
start_busstop
);
// updateCARD(start_busstop);
}
else
{
stop_busstop
=
dataSnapshot
.
child
(
"nameEN"
).
getValue
(
String
.
class
);
txt_stop
.
setText
(
stop_busstop
);
progressBar
.
setVisibility
(
View
.
GONE
);
}
k
+=
1
;
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
Log
.
d
(
TAG
,
"Read failed"
);
}
});
}
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
Log
.
d
(
TAG
,
"Read failed"
);
}
});
updateUI
(
user_status
);
updateUI
(
user_status
);
if
(
user_status
.
equalsIgnoreCase
(
"on"
))
{
if
(
user_status
.
equalsIgnoreCase
(
"on"
))
{
buildNotification
();
buildNotification
();
trackBus
(
user_id
,
bus_id
);
trackBus
(
user_id
,
bus_id
);
}
}
}
}
@Override
@Override
...
@@ -116,9 +171,6 @@ public class MainActivity extends AppCompatActivity {
...
@@ -116,9 +171,6 @@ public class MainActivity extends AppCompatActivity {
});
});
// if(!user_status){
// txt_user_status.setVisibility(View.GONE);
// }
btn_profile
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
btn_profile
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
@@ -177,6 +229,24 @@ public class MainActivity extends AppCompatActivity {
...
@@ -177,6 +229,24 @@ public class MainActivity extends AppCompatActivity {
}
}
});
});
btn_return
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
if
(
user_status
.
equalsIgnoreCase
(
"on"
)){
start_busstop
=
txt_start
.
getText
()+
""
;
stop_busstop
=
txt_stop
.
getText
()+
""
;
txt_start
.
setText
(
stop_busstop
);
txt_stop
.
setText
(
start_busstop
);
}
else
{
start_busstop
=
txt_start
.
getText
()+
""
;
stop_busstop
=
txt_stop
.
getText
()+
""
;
txt_start
.
setText
(
stop_busstop
);
txt_stop
.
setText
(
start_busstop
);
}
Log
.
d
(
TAG
,
"onClick: RETURN"
+
user_status
+
" start"
+
start_busstop
+
" stop:"
+
stop_busstop
);
}
});
//
//
// MaterialShadowContainerView shadowView =
// MaterialShadowContainerView shadowView =
...
@@ -202,13 +272,15 @@ public class MainActivity extends AppCompatActivity {
...
@@ -202,13 +272,15 @@ public class MainActivity extends AppCompatActivity {
progressBar
.
setVisibility
(
View
.
GONE
);
progressBar
.
setVisibility
(
View
.
GONE
);
}
}
public
void
updateUI
(
String
user_status
)
{
public
void
updateUI
(
String
user_status
)
{
// txt_start.setText(start_busstop);
// txt_stop.setText(stop_busstop);
if
(
user_status
.
equalsIgnoreCase
(
"off"
))
{
if
(
user_status
.
equalsIgnoreCase
(
"off"
))
{
btn_active_bus
.
setVisibility
(
View
.
VISIBLE
);
btn_active_bus
.
setVisibility
(
View
.
VISIBLE
);
txt_user_status_off
.
setVisibility
(
View
.
VISIBLE
);
txt_user_status_off
.
setVisibility
(
View
.
VISIBLE
);
btn_endtrip
.
setVisibility
(
View
.
GONE
);
btn_endtrip
.
setVisibility
(
View
.
GONE
);
btn_return
.
setVisibility
(
View
.
GON
E
);
btn_return
.
setVisibility
(
View
.
VISIBL
E
);
txt_user_status_on
.
setVisibility
(
View
.
GONE
);
txt_user_status_on
.
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
btn_active_bus
.
setVisibility
(
View
.
GONE
);
btn_active_bus
.
setVisibility
(
View
.
GONE
);
...
@@ -218,7 +290,6 @@ public class MainActivity extends AppCompatActivity {
...
@@ -218,7 +290,6 @@ public class MainActivity extends AppCompatActivity {
btn_return
.
setVisibility
(
View
.
VISIBLE
);
btn_return
.
setVisibility
(
View
.
VISIBLE
);
txt_user_status_on
.
setVisibility
(
View
.
VISIBLE
);
txt_user_status_on
.
setVisibility
(
View
.
VISIBLE
);
}
}
progressBar
.
setVisibility
(
View
.
GONE
);
// view_cover.getForeground().setAlpha(0);
// view_cover.getForeground().setAlpha(0);
Log
.
d
(
TAG
,
"updateUI: "
+
user_status
);
Log
.
d
(
TAG
,
"updateUI: "
+
user_status
);
}
}
...
@@ -251,9 +322,15 @@ public class MainActivity extends AppCompatActivity {
...
@@ -251,9 +322,15 @@ public class MainActivity extends AppCompatActivity {
}
}
private
void
startTrackerService
(
String
user_id
,
String
bus_id
)
{
private
void
startTrackerService
(
String
user_id
,
String
bus_id
)
{
// txt_start.setText(stop_busstop);
// txt_stop.setText(start_busstop);
String
destination
=
txt_stop
.
getText
()+
""
;
Log
.
d
(
TAG
,
"startTrackerService: "
+
start_busstop
+
" "
+
stop_busstop
);
Intent
intent
=
new
Intent
(
this
,
TrackerService3
.
class
);
Intent
intent
=
new
Intent
(
this
,
TrackerService3
.
class
);
intent
.
putExtra
(
"user_id"
,
user_id
);
intent
.
putExtra
(
"user_id"
,
user_id
);
intent
.
putExtra
(
"bus_id"
,
bus_id
);
intent
.
putExtra
(
"bus_id"
,
bus_id
);
intent
.
putExtra
(
"destination"
,
destination
);
startService
(
intent
);
startService
(
intent
);
}
}
...
@@ -273,17 +350,10 @@ public class MainActivity extends AppCompatActivity {
...
@@ -273,17 +350,10 @@ public class MainActivity extends AppCompatActivity {
private
void
buildNotification
()
{
private
void
buildNotification
()
{
NotificationCompat
.
Builder
mBuilder
=
NotificationCompat
.
Builder
mBuilder
=
new
NotificationCompat
.
Builder
(
this
)
new
NotificationCompat
.
Builder
(
this
)
.
setSmallIcon
(
R
.
drawable
.
ic_wifi_bus
)
.
setSmallIcon
(
R
.
drawable
.
ic_wifi_bus
)
.
setContentTitle
(
"On Going"
)
.
setContentTitle
(
"On Going"
)
.
setContentText
(
"Tracking, tap to open"
)
.
setContentText
(
"Tracking, tap to open"
)
.
setOngoing
(
true
);
.
setOngoing
(
true
);
//Create the intent that’ll fire when the user taps the notification//
// Intent intent = new Intent(this, MainActivity.class);
// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
//
// mBuilder.setContentIntent(pendingIntent);
PendingIntent
contentIntent
=
PendingIntent
.
getActivity
(
this
,
0
,
PendingIntent
contentIntent
=
PendingIntent
.
getActivity
(
this
,
0
,
new
Intent
(
this
,
MainActivity
.
class
),
PendingIntent
.
FLAG_UPDATE_CURRENT
);
new
Intent
(
this
,
MainActivity
.
class
),
PendingIntent
.
FLAG_UPDATE_CURRENT
);
...
@@ -292,7 +362,7 @@ public class MainActivity extends AppCompatActivity {
...
@@ -292,7 +362,7 @@ public class MainActivity extends AppCompatActivity {
mBuilder
.
setContentIntent
(
contentIntent
);
mBuilder
.
setContentIntent
(
contentIntent
);
mNotificationManager
=
(
NotificationManager
)
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
mNotificationManager
=
(
NotificationManager
)
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
mNotificationManager
.
notify
(
001
,
mBuilder
.
build
());
mNotificationManager
.
notify
(
001
,
mBuilder
.
build
());
}
}
...
@@ -300,16 +370,12 @@ public class MainActivity extends AppCompatActivity {
...
@@ -300,16 +370,12 @@ public class MainActivity extends AppCompatActivity {
@Override
@Override
protected
void
onPause
()
{
protected
void
onPause
()
{
super
.
onPause
();
super
.
onPause
();
// if(user_status.equalsIgnoreCase("on")){
// buildNotification();
// }
}
}
@Override
@Override
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
super
.
onDestroy
();
super
.
onDestroy
();
// NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
// notificationManager.cancel(001);
}
}
}
}
app/src/main/java/ubontransitdriver/paded/com/ubontransitdriver/TrackerService3.java
View file @
396711c0
...
@@ -35,6 +35,7 @@ public class TrackerService3 extends Service implements
...
@@ -35,6 +35,7 @@ public class TrackerService3 extends Service implements
String
TAG
=
"trackService"
;
String
TAG
=
"trackService"
;
private
String
user_id
;
private
String
user_id
;
private
String
bus_id
;
private
String
bus_id
;
private
String
destination
;
@Nullable
@Nullable
@Override
@Override
public
IBinder
onBind
(
Intent
intent
)
{
public
IBinder
onBind
(
Intent
intent
)
{
...
@@ -45,6 +46,7 @@ public class TrackerService3 extends Service implements
...
@@ -45,6 +46,7 @@ public class TrackerService3 extends Service implements
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
user_id
=
intent
.
getStringExtra
(
"user_id"
);
user_id
=
intent
.
getStringExtra
(
"user_id"
);
bus_id
=
intent
.
getStringExtra
(
"bus_id"
);
bus_id
=
intent
.
getStringExtra
(
"bus_id"
);
destination
=
intent
.
getStringExtra
(
"destination"
);
Log
.
d
(
TAG
,
"onStartCommand: "
+
user_id
+
" "
+
bus_id
);
Log
.
d
(
TAG
,
"onStartCommand: "
+
user_id
+
" "
+
bus_id
);
mFusedLocationClient
=
LocationServices
.
getFusedLocationProviderClient
(
this
);
mFusedLocationClient
=
LocationServices
.
getFusedLocationProviderClient
(
this
);
if
(
mGoogleApiClient
!=
null
&&
mFusedLocationClient
!=
null
)
{
if
(
mGoogleApiClient
!=
null
&&
mFusedLocationClient
!=
null
)
{
...
@@ -95,6 +97,7 @@ public class TrackerService3 extends Service implements
...
@@ -95,6 +97,7 @@ public class TrackerService3 extends Service implements
ref
.
child
(
"latitude"
).
setValue
(
location
.
getLatitude
());
ref
.
child
(
"latitude"
).
setValue
(
location
.
getLatitude
());
ref
.
child
(
"longitude"
).
setValue
(
location
.
getLongitude
());
ref
.
child
(
"longitude"
).
setValue
(
location
.
getLongitude
());
ref
.
child
(
"time"
).
setValue
(
location
.
getTime
());
ref
.
child
(
"time"
).
setValue
(
location
.
getTime
());
ref
.
child
(
"destination"
).
setValue
(
destination
);
// Date currentTime = Calendar.getInstance().getTime();
// Date currentTime = Calendar.getInstance().getTime();
// Log.d(TAG, "Location: " + location.getLatitude() + " " + location.getLongitude()+" "+location.getTime()+" "+currentTime);
// Log.d(TAG, "Location: " + location.getLatitude() + " " + location.getLongitude()+" "+location.getTime()+" "+currentTime);
...
...
app/src/main/res/drawable/bg_btn_activebus_clicked.xml
View file @
396711c0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/green"
/>
<solid
android:color=
"@color/
off_
green"
/>
<corners
android:radius=
"8dp"
/>
<corners
android:radius=
"8dp"
/>
<padding
<padding
...
...
app/src/main/res/drawable/bg_btn_activebus_normal.xml
View file @
396711c0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/
white
"
/>
<solid
android:color=
"@color/
green
"
/>
<corners
android:radius=
"8dp"
/>
<corners
android:radius=
"8dp"
/>
<
stroke
<
!--<stroke-->
android:width =
"1.5dp"
<!--android:width = "1.5dp"-->
android:color=
"@color/green"
<!--android:color="@color/green"-->
/
>
<!--/>--
>
<padding
<padding
android:bottom=
"7dip"
android:bottom=
"7dip"
...
...
app/src/main/res/drawable/bg_endtrip_bus_clicked.xml
View file @
396711c0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/
gray_100
"
/>
<solid
android:color=
"@color/
off_red
"
/>
<corners
android:radius=
"8dp"
/>
<corners
android:radius=
"8dp"
/>
<padding
<padding
...
...
app/src/main/res/drawable/bg_endtrip_bus_normal.xml
View file @
396711c0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/
white
"
/>
<solid
android:color=
"@color/
red
"
/>
<corners
android:radius=
"8dp"
/>
<corners
android:radius=
"8dp"
/>
<
stroke
<
!--<stroke-->
android:width=
"1dp"
<!--android:width="1dp"-->
android:color=
"#e7e8ea"
>
<!--android:color="#e7e8ea" >--
>
<
/stroke
>
<
!--</stroke>--
>
<padding
<padding
android:bottom=
"7dip"
android:bottom=
"7dip"
android:left=
"7dip"
android:left=
"7dip"
...
...
app/src/main/res/drawable/bg_return_bus_clicked.xml
View file @
396711c0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/
off_blue
"
/>
<solid
android:color=
"@color/
gray_100
"
/>
<corners
android:radius=
"8dp"
/>
<corners
android:radius=
"8dp"
/>
<padding
<padding
...
...
app/src/main/res/drawable/bg_return_bus_normal.xml
View file @
396711c0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/
blu
e"
/>
<solid
android:color=
"@color/
whit
e"
/>
<corners
android:radius=
"8dp"
/>
<corners
android:radius=
"8dp"
/>
<stroke
android:width=
"1dp"
android:color=
"#e7e8ea"
>
</stroke>
<padding
<padding
android:bottom=
"7dip"
android:bottom=
"7dip"
android:left=
"7dip"
android:left=
"7dip"
...
...
app/src/main/res/drawable/ic_arrows.xml
0 → 100644
View file @
396711c0
<vector
android:height=
"24dp"
android:viewportHeight=
"479.71"
android:viewportWidth=
"479.71"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"@color/gray_500"
android:pathData=
"M469.936,328.847c-0.96,-0.927 -1.977,-1.792 -3.045,-2.592c-13.381,-8.971 -31.276,-7.013 -42.4,4.64l-10.08,10.08c-3.469,3.481 -6.383,7.474 -8.64,11.84l-6.24,12V66.575c0.634,-16.247 -10.62,-30.552 -26.56,-33.76c-17.486,-2.564 -33.74,9.534 -36.303,27.02c-0.242,1.649 -0.354,3.314 -0.337,4.98v299.52l-4.32,-9.44c-2.335,-5.046 -5.529,-9.648 -9.44,-13.6l-10.56,-10.56c-11.124,-11.653 -29.019,-13.611 -42.4,-4.64c-14.259,10.441 -17.355,30.464 -6.914,44.724c0.844,1.152 1.764,2.247 2.754,3.276l80,80c12.49,12.504 32.751,12.515 45.255,0.025c0.008,-0.008 0.017,-0.017 0.025,-0.025l80,-80C483.006,361.38 482.65,341.122 469.936,328.847z"
/>
<path
android:fillColor=
"@color/gray_500"
android:pathData=
"M214.411,104.655l-78.88,-79.04C123.041,13.111 102.78,13.1 90.276,25.59c-0.008,0.008 -0.017,0.017 -0.025,0.025l-80,80c-11.653,11.124 -13.611,29.019 -4.64,42.4c10.441,14.259 30.464,17.355 44.724,6.914c1.152,-0.844 2.247,-1.764 3.276,-2.754l10.88,-10.88c5.215,-5.219 9.158,-11.57 11.52,-18.56l4.32,-9.92v302.24c-0.607,16.347 10.812,30.689 26.88,33.76c17.445,2.829 33.881,-9.019 36.71,-26.465c0.297,-1.83 0.434,-3.682 0.41,-5.535v-304l3.2,9.12c2.403,6.746 6.284,12.869 11.36,17.92l11.52,11.52c12.492,12.501 32.753,12.509 45.255,0.017c0.621,-0.621 1.217,-1.267 1.785,-1.937C228.183,135.984 226.864,116.552 214.411,104.655z"
/>
</vector>
app/src/main/res/drawable/ic_close.xml
View file @
396711c0
<vector
android:height=
"24dp"
android:viewportHeight=
"51.976"
<vector
android:height=
"24dp"
android:viewportHeight=
"51.976"
android:viewportWidth=
"51.976"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
android:viewportWidth=
"51.976"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"@color/
gray_500
"
android:pathData=
"M44.373,7.603c-10.137,-10.137 -26.632,-10.138 -36.77,0c-10.138,10.138 -10.137,26.632 0,36.77s26.632,10.138 36.77,0C54.51,34.235 54.51,17.74 44.373,7.603zM36.241,36.241c-0.781,0.781 -2.047,0.781 -2.828,0l-7.425,-7.425l-7.778,7.778c-0.781,0.781 -2.047,0.781 -2.828,0c-0.781,-0.781 -0.781,-2.047 0,-2.828l7.778,-7.778l-7.425,-7.425c-0.781,-0.781 -0.781,-2.048 0,-2.828c0.781,-0.781 2.047,-0.781 2.828,0l7.425,7.425l7.071,-7.071c0.781,-0.781 2.047,-0.781 2.828,0c0.781,0.781 0.781,2.047 0,2.828l-7.071,7.071l7.425,7.425C37.022,34.194 37.022,35.46 36.241,36.241z"
/>
<path
android:fillColor=
"@color/
white
"
android:pathData=
"M44.373,7.603c-10.137,-10.137 -26.632,-10.138 -36.77,0c-10.138,10.138 -10.137,26.632 0,36.77s26.632,10.138 36.77,0C54.51,34.235 54.51,17.74 44.373,7.603zM36.241,36.241c-0.781,0.781 -2.047,0.781 -2.828,0l-7.425,-7.425l-7.778,7.778c-0.781,0.781 -2.047,0.781 -2.828,0c-0.781,-0.781 -0.781,-2.047 0,-2.828l7.778,-7.778l-7.425,-7.425c-0.781,-0.781 -0.781,-2.048 0,-2.828c0.781,-0.781 2.047,-0.781 2.828,0l7.425,7.425l7.071,-7.071c0.781,-0.781 2.047,-0.781 2.828,0c0.781,0.781 0.781,2.047 0,2.828l-7.071,7.071l7.425,7.425C37.022,34.194 37.022,35.46 36.241,36.241z"
/>
</vector>
</vector>
app/src/main/res/layout/bottom_sheet_endtrip.xml
View file @
396711c0
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
android:id=
"@+id/btn_endtrip_yes"
android:id=
"@+id/btn_endtrip_yes"
android:layout_marginTop=
"18dp"
android:layout_marginTop=
"18dp"
style=
"?android:attr/borderlessButtonStyle"
style=
"?android:attr/borderlessButtonStyle"
android:background=
"@drawable/bg_
return
_bus"
android:background=
"@drawable/bg_
endtrip
_bus"
android:textStyle=
"bold"
android:textStyle=
"bold"
android:text=
"End Trip"
android:text=
"End Trip"
android:textSize=
"18dp"
android:textSize=
"18dp"
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
android:text=
"Cancel"
android:text=
"Cancel"
android:textSize=
"18dp"
android:textSize=
"18dp"
android:textColor=
"@color/gray_500"
android:textColor=
"@color/gray_500"
android:background=
"@drawable/bg_
endtrip
_bus"
android:background=
"@drawable/bg_
return
_bus"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
...
...
app/src/main/res/layout/main_layout.xml
View file @
396711c0
...
@@ -151,9 +151,9 @@
...
@@ -151,9 +151,9 @@
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<TextView
<TextView
android:id=
"@+id/txt_stop"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Ubon Terminal"
android:textColor=
"@color/gray_800"
android:textColor=
"@color/gray_800"
android:textSize=
"26dp"
android:textSize=
"26dp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
...
@@ -190,9 +190,9 @@
...
@@ -190,9 +190,9 @@
android:textSize=
"17dp"
/>
android:textSize=
"17dp"
/>
<TextView
<TextView
android:id=
"@+id/txt_start"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Ubon Ratchathani"
android:textColor=
"@color/blue"
android:textColor=
"@color/blue"
android:textSize=
"17dp"
/>
android:textSize=
"17dp"
/>
...
@@ -475,11 +475,11 @@
...
@@ -475,11 +475,11 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:background=
"@drawable/bg_return_bus"
android:background=
"@drawable/bg_return_bus"
android:drawableRight=
"@drawable/ic_
return
"
android:drawableRight=
"@drawable/ic_
arrows
"
android:gravity=
"left|center_vertical"
android:gravity=
"left|center_vertical"
android:padding=
"15dp"
android:padding=
"15dp"
android:text=
"Return"
android:text=
"Return"
android:textColor=
"@color/
white
"
android:textColor=
"@color/
gray_500
"
android:textSize=
"20dp"
android:textSize=
"20dp"
android:textStyle=
"bold"
android:textStyle=
"bold"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
@@ -495,7 +495,7 @@
...
@@ -495,7 +495,7 @@
android:gravity=
"left|center_vertical"
android:gravity=
"left|center_vertical"
android:padding=
"15dp"
android:padding=
"15dp"
android:text=
"End Trip"
android:text=
"End Trip"
android:textColor=
"@color/
gray_500
"
android:textColor=
"@color/
white
"
android:textSize=
"20dp"
android:textSize=
"20dp"
android:textStyle=
"bold"
android:textStyle=
"bold"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
@@ -507,11 +507,11 @@
...
@@ -507,11 +507,11 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:background=
"@drawable/bg_btn_activebus"
android:background=
"@drawable/bg_btn_activebus"
android:drawableRight=
"@drawable/ic
on_active_clicked
"
android:drawableRight=
"@drawable/ic
_track_changes_white_24dp
"
android:gravity=
"left|center_vertical"
android:gravity=
"left|center_vertical"
android:padding=
"15dp"
android:padding=
"15dp"
android:text=
"Active Bus"
android:text=
"Active Bus"
android:textColor=
"@
drawable/text_active_color
"
android:textColor=
"@
color/white
"
android:textSize=
"20dp"
android:textSize=
"20dp"
android:textStyle=
"bold"
android:textStyle=
"bold"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
...
app/src/main/res/values/colors.xml
View file @
396711c0
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<color
name=
"green"
>
#4cd964
</color>
<color
name=
"green"
>
#4cd964
</color>
<color
name=
"off_green"
>
#47c75d
</color>
<color
name=
"off_green"
>
#47c75d
</color>
<color
name=
"red"
>
#ff2d55
</color>
<color
name=
"red"
>
#ff2d55
</color>
<color
name=
"off_red"
>
#ea294d
</color>
<color
name=
"black"
>
#000000
</color>
<color
name=
"black"
>
#000000
</color>
<color
name=
"half_black"
>
#303030
</color>
<color
name=
"half_black"
>
#303030
</color>
<color
name=
"gray"
>
#ececec
</color>
<color
name=
"gray"
>
#ececec
</color>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment