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
d839d2e4
Commit
d839d2e4
authored
Jan 21, 2018
by
Paded
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add logout function and profile setting activity
parent
8f50c75e
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
1243 additions
and
118 deletions
+1243
-118
build_file_checksums.ser
.idea/caches/build_file_checksums.ser
+0
-0
build.gradle
app/build.gradle
+2
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+6
-4
AllBus.java
...ubontransitdriver/paded/com/ubontransitdriver/AllBus.java
+16
-0
CreateAccountActivity.java
...er/paded/com/ubontransitdriver/CreateAccountActivity.java
+102
-50
MainActivity.java
...ansitdriver/paded/com/ubontransitdriver/MainActivity.java
+50
-6
ProfileSettingActivity.java
...r/paded/com/ubontransitdriver/ProfileSettingActivity.java
+86
-0
ic_return.png
app/src/main/res/drawable-hdpi/ic_return.png
+0
-0
ic_return.png
app/src/main/res/drawable-ldpi/ic_return.png
+0
-0
ic_return.png
app/src/main/res/drawable-mdpi/ic_return.png
+0
-0
ic_return.png
app/src/main/res/drawable-xhdpi/ic_return.png
+0
-0
ic_return.png
app/src/main/res/drawable-xxhdpi/ic_return.png
+0
-0
ic_return.png
app/src/main/res/drawable-xxxhdpi/ic_return.png
+0
-0
bg_destination_driver.xml
app/src/main/res/drawable/bg_destination_driver.xml
+15
-0
bg_edittext_focused.xml
app/src/main/res/drawable/bg_edittext_focused.xml
+4
-0
bg_endtrip_bus.xml
app/src/main/res/drawable/bg_endtrip_bus.xml
+9
-0
bg_endtrip_bus_clicked.xml
app/src/main/res/drawable/bg_endtrip_bus_clicked.xml
+12
-0
bg_endtrip_bus_normal.xml
app/src/main/res/drawable/bg_endtrip_bus_normal.xml
+15
-0
bg_header_label.xml
app/src/main/res/drawable/bg_header_label.xml
+23
-0
bg_logout.xml
app/src/main/res/drawable/bg_logout.xml
+9
-0
bg_logout_clicked.xml
app/src/main/res/drawable/bg_logout_clicked.xml
+26
-0
bg_logout_normal.xml
app/src/main/res/drawable/bg_logout_normal.xml
+21
-0
bg_ongoing.xml
app/src/main/res/drawable/bg_ongoing.xml
+14
-0
bg_profile.xml
app/src/main/res/drawable/bg_profile.xml
+9
-0
bg_profile_clicked.xml
app/src/main/res/drawable/bg_profile_clicked.xml
+23
-0
bg_profile_normal.xml
app/src/main/res/drawable/bg_profile_normal.xml
+20
-0
bg_return_bus.xml
app/src/main/res/drawable/bg_return_bus.xml
+9
-0
bg_return_bus_clicked.xml
app/src/main/res/drawable/bg_return_bus_clicked.xml
+12
-0
bg_return_bus_normal.xml
app/src/main/res/drawable/bg_return_bus_normal.xml
+12
-0
btn_heading.xml
app/src/main/res/drawable/btn_heading.xml
+9
-0
btn_heading_clicked.xml
app/src/main/res/drawable/btn_heading_clicked.xml
+23
-0
btn_heading_normal.xml
app/src/main/res/drawable/btn_heading_normal.xml
+23
-0
bus_color_icon_green.xml
app/src/main/res/drawable/bus_color_icon_green.xml
+23
-0
bus_color_icon_red.xml
app/src/main/res/drawable/bus_color_icon_red.xml
+23
-0
ic_close.xml
app/src/main/res/drawable/ic_close.xml
+4
-0
ic_frontal_bus_silhouette_white.xml
...src/main/res/drawable/ic_frontal_bus_silhouette_white.xml
+4
-0
ic_menu_camera.xml
app/src/main/res/drawable/ic_menu_camera.xml
+12
-0
ic_menu_gallery.xml
app/src/main/res/drawable/ic_menu_gallery.xml
+9
-0
ic_menu_manage.xml
app/src/main/res/drawable/ic_menu_manage.xml
+10
-0
ic_menu_send.xml
app/src/main/res/drawable/ic_menu_send.xml
+9
-0
ic_menu_share.xml
app/src/main/res/drawable/ic_menu_share.xml
+9
-0
ic_menu_slideshow.xml
app/src/main/res/drawable/ic_menu_slideshow.xml
+9
-0
ic_more_vert_black_24dp.xml
app/src/main/res/drawable/ic_more_vert_black_24dp.xml
+9
-0
ic_person_dark_gray_24dp.xml
app/src/main/res/drawable/ic_person_dark_gray_24dp.xml
+9
-0
ic_person_gray_24dp.xml
app/src/main/res/drawable/ic_person_gray_24dp.xml
+9
-0
ic_previous.xml
app/src/main/res/drawable/ic_previous.xml
+4
-0
ic_start_black_24dp.xml
app/src/main/res/drawable/ic_start_black_24dp.xml
+9
-0
ic_stop_black_24dp.xml
app/src/main/res/drawable/ic_stop_black_24dp.xml
+9
-0
side_nav_bar.xml
app/src/main/res/drawable/side_nav_bar.xml
+32
-0
bottom_sheet_layout.xml
app/src/main/res/layout/bottom_sheet_layout.xml
+4
-3
create_account_layout.xml
app/src/main/res/layout/create_account_layout.xml
+24
-5
login_layout.xml
app/src/main/res/layout/login_layout.xml
+1
-0
main_layout.xml
app/src/main/res/layout/main_layout.xml
+291
-32
profile_setting_layout.xml
app/src/main/res/layout/profile_setting_layout.xml
+86
-0
reset_password_layout.xml
app/src/main/res/layout/reset_password_layout.xml
+1
-0
main2.xml
app/src/main/res/menu/main2.xml
+9
-0
main2_layout_drawer.xml
app/src/main/res/menu/main2_layout_drawer.xml
+38
-0
styles.xml
app/src/main/res/values-v21/styles.xml
+1
-0
colors.xml
app/src/main/res/values/colors.xml
+7
-0
dimens.xml
app/src/main/res/values/dimens.xml
+4
-0
strings.xml
app/src/main/res/values/strings.xml
+8
-14
styles.xml
app/src/main/res/values/styles.xml
+26
-4
No files found.
.idea/caches/build_file_checksums.ser
View file @
d839d2e4
No preview for this file type
app/build.gradle
View file @
d839d2e4
...
...
@@ -30,6 +30,8 @@ dependencies {
androidTestImplementation
'com.android.support.test:runner:1.0.1'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.1'
compile
'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'
compile
'com.loopeer.lib:shadow:0.0.4-beta1'
compile
'com.readystatesoftware.systembartint:systembartint:1.0.3'
}
apply
plugin:
'com.google.gms.google-services'
app/src/main/AndroidManifest.xml
View file @
d839d2e4
...
...
@@ -14,9 +14,9 @@
<activity
android:name=
".MainActivity"
android:windowSoftInputMode=
"adjustResize"
/>
<activity
android:name=
".CreateAccountActivity"
android:
windowSoftInputMode=
"adjustResize
"
/>
<activity
android:
name=
".CreateAccountActivity
"
android:windowSoftInputMode=
"adjustResize"
/>
<activity
android:name=
".SplashActivity"
android:theme=
"@style/SplashTheme"
>
...
...
@@ -30,7 +30,8 @@
android:name=
".LoginActivity"
android:windowSoftInputMode=
"adjustResize"
/>
<activity
android:name=
".ResetPasswordActivity"
/>
<activity
android:name=
".AddBusActivity"
></activity>
<activity
android:name=
".AddBusActivity"
/>
<activity
android:name=
".ProfileSettingActivity"
></activity>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/ubontransitdriver/paded/com/ubontransitdriver/AllBus.java
0 → 100644
View file @
d839d2e4
package
ubontransitdriver
.
paded
.
com
.
ubontransitdriver
;
public
class
AllBus
{
public
String
name
;
public
AllBus
()
{
}
public
AllBus
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getName
()
{
return
name
;
}
}
app/src/main/java/ubontransitdriver/paded/com/ubontransitdriver/CreateAccountActivity.java
View file @
d839d2e4
...
...
@@ -36,9 +36,11 @@ import com.google.firebase.database.ValueEventListener;
import
com.h6ah4i.android.materialshadowninepatch.MaterialShadowContainerView
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
CreateAccountActivity
extends
AppCompatActivity
implements
ItemAdapter
.
ItemListener
{
private
EditText
inputEmail
,
inputPassword
,
inputName
;
private
EditText
inputEmail
,
inputPassword
,
inputName
,
inputAddBus
;
private
Button
btnCreateAccount
,
btnLogin
,
btnResetPassword
,
btnAddBus
;
private
ProgressBar
progressBar
;
private
FirebaseAuth
auth
;
...
...
@@ -51,6 +53,8 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
private
ItemAdapter
mAdapter
;
CoordinatorLayout
coordinatorLayout
;
BottomSheetBehavior
behavior
;
ArrayList
<
String
>
items
;
Map
<
String
,
String
>
myLine
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -65,35 +69,52 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
inputEmail
=
(
EditText
)
findViewById
(
R
.
id
.
input_email
);
inputPassword
=
(
EditText
)
findViewById
(
R
.
id
.
input_password
);
inputName
=
(
EditText
)
findViewById
(
R
.
id
.
input_name
);
inputAddBus
=
(
EditText
)
findViewById
(
R
.
id
.
btn_addBus
);
progressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
progressBar
);
btnCreateAccount
=
(
Button
)
findViewById
(
R
.
id
.
btn_create_account
);
btnResetPassword
=
(
Button
)
findViewById
(
R
.
id
.
btn_reset_password
);
btnLogin
=
(
Button
)
findViewById
(
R
.
id
.
btnLogin
);
btnAddBus
=
(
Button
)
findViewById
(
R
.
id
.
btn_addBus
);
//
btnAddBus = (Button)findViewById(R.id.btn_addBus);
layout_MainMenu
=
(
FrameLayout
)
findViewById
(
R
.
id
.
framelayout
);
layout_MainMenu
.
getForeground
().
setAlpha
(
0
);
// View bottomSheetView = getLayoutInflater().inflate(R.layout.bottom_sheet_layout, null);
// bottomSheetDialog = new BottomSheetDialog(CreateAccountActivity.this);
// bottomSheetDialog.setContentView(bottomSheetView);
//
// bottomSheetBehavior = BottomSheetBehavior.from((View) bottomSheetView.getParent());
//
// bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
// TextView addMenu = (TextView) bottomSheetView.findViewById(R.id.menu_add_bus0);
// TextView editMenu = (TextView) bottomSheetView.findViewById(R.id.menu_add_bus1);
// TextView deleteMenu = (TextView) bottomSheetView.findViewById(R.id.menu_add_bus2);
// addMenu.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// bottomSheetDialog.hide();
// }
// });
DatabaseReference
database
=
FirebaseDatabase
.
getInstance
().
getReference
();
// Attach a listener to read the data at our posts reference
database
.
child
(
"allbus"
).
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
for
(
DataSnapshot
ds
:
dataSnapshot
.
getChildren
())
{
String
key
=
(
String
)
ds
.
getKey
();
DatabaseReference
keyReference
=
FirebaseDatabase
.
getInstance
().
getReference
().
child
(
"allbus"
).
child
(
key
);
keyReference
.
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
Log
.
d
(
TAG
,
"onDataChange: "
+
dataSnapshot
.
child
(
"name"
).
getValue
(
String
.
class
));
AllBus
post
=
new
AllBus
(
dataSnapshot
.
child
(
"name"
).
getValue
(
String
.
class
));
// items.add(dataSnapshot.child("name").getValue(String.class));
// AllBus post = dataSnapshot.child("name").getValue(AllBus.class);
// Log.d(TAG, "onDataChange: "+post.getName());
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
Log
.
d
(
TAG
,
"Read failed"
);
}
});
}
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
System
.
out
.
println
(
"The read failed: "
+
databaseError
.
getCode
());
}
});
btnCreateAccount
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -104,13 +125,19 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
String
email
=
inputEmail
.
getText
().
toString
().
trim
();
String
password
=
inputPassword
.
getText
().
toString
().
trim
();
final
String
selected_bus
=
inputAddBus
.
getText
().
toString
().
trim
();
final
String
userName
=
inputName
.
getText
().
toString
().
trim
();
if
(
selected_bus
.
equalsIgnoreCase
(
"Add Your Bus"
))
{
Toast
.
makeText
(
getApplicationContext
(),
"Please select your bus!"
,
Toast
.
LENGTH_SHORT
).
show
();
return
;
}
if
(
TextUtils
.
isEmpty
(
email
))
{
Toast
.
makeText
(
getApplicationContext
(),
"Enter email address!"
,
Toast
.
LENGTH_SHORT
).
show
();
return
;
}
if
(
TextUtils
.
isEmpty
(
password
))
{
Toast
.
makeText
(
getApplicationContext
(),
"Enter password!"
,
Toast
.
LENGTH_SHORT
).
show
();
return
;
...
...
@@ -133,7 +160,7 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
auth
.
createUserWithEmailAndPassword
(
email
,
password
).
addOnCompleteListener
(
CreateAccountActivity
.
this
,
new
OnCompleteListener
<
AuthResult
>()
{
@Override
public
void
onComplete
(
@NonNull
Task
<
AuthResult
>
task
)
{
Toast
.
makeText
(
CreateAccountActivity
.
this
,
"
createUserWithEmail:onComplete:
"
+
task
.
isSuccessful
(),
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
CreateAccountActivity
.
this
,
"
Create User Complete
"
+
task
.
isSuccessful
(),
Toast
.
LENGTH_SHORT
).
show
();
progressBar
.
setVisibility
(
View
.
GONE
);
if
(!
task
.
isSuccessful
())
{
...
...
@@ -142,7 +169,7 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
}
else
{
FirebaseUser
user
=
auth
.
getCurrentUser
();
Log
.
d
(
TAG
,
"onComplete: "
+
user
.
getUid
());
insertData
(
user
.
getUid
(),
userName
);
insertData
(
user
.
getUid
(),
userName
,
selected_bus
);
startActivity
(
new
Intent
(
CreateAccountActivity
.
this
,
MainActivity
.
class
));
finish
();
}
...
...
@@ -178,7 +205,7 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
@Override
public
void
onStateChanged
(
@NonNull
View
bottomSheet
,
int
newState
)
{
Log
.
d
(
TAG
,
"onStateChanged: "
+
newState
);
//
Log.d(TAG, "onStateChanged: "+newState);
}
...
...
@@ -187,7 +214,7 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
if
(
slideOffset
==
0.0
){
layout_MainMenu
.
getForeground
().
setAlpha
(
0
);
}
Log
.
d
(
TAG
,
"slideOffset: "
+
slideOffset
);
//
Log.d(TAG, "slideOffset: "+slideOffset);
// React to dragging events
}
});
...
...
@@ -201,38 +228,36 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
recyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
// Get a reference to our posts
final
FirebaseDatabase
database
=
FirebaseDatabase
.
getInstance
();
DatabaseReference
ref
=
database
.
getReference
(
"server/saving-data/fireblog/posts"
);
// final FirebaseDatabase database = FirebaseDatabase.getInstance();
// DatabaseReference ref = database.getReference("allbus");
// var adaRef = usersRef.child('ada');
// Log.d(TAG,"I am here"+ref);
items
=
new
ArrayList
<>();
items
.
add
(
"สาย ม."
);
items
.
add
(
"สาย 1"
);
items
.
add
(
"สาย 2"
);
items
.
add
(
"สาย 3"
);
items
.
add
(
"สาย 7"
);
items
.
add
(
"สาย 8"
);
items
.
add
(
"สาย 9"
);
items
.
add
(
"สาย 10"
);
items
.
add
(
"สาย 11"
);
items
.
add
(
"สาย 12"
);
// Attach a listener to read the data at our posts reference
ref
.
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
Post
post
=
dataSnapshot
.
getValue
(
Post
.
class
);
System
.
out
.
println
(
post
);
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
System
.
out
.
println
(
"The read failed: "
+
databaseError
.
getCode
());
}
});
ArrayList
<
String
>
items
=
new
ArrayList
<>();
items
.
add
(
"Item 16"
);
items
.
add
(
"Item 2"
);
items
.
add
(
"Item 3"
);
items
.
add
(
"Item 4"
);
items
.
add
(
"Item 5"
);
items
.
add
(
"Item 6"
);
mAdapter
=
new
ItemAdapter
(
items
,
this
);
recyclerView
.
setAdapter
(
mAdapter
);
btn
AddBus
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
input
AddBus
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
InputMethodManager
imm
=
(
InputMethodManager
)
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
...
...
@@ -244,12 +269,35 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
}
public
void
insertData
(
String
uid
,
String
name
){
public
void
insertData
(
String
uid
,
String
name
,
String
select_bus
){
String
busid
=
""
;
if
(
select_bus
.
equalsIgnoreCase
(
"สาย ม."
)){
busid
=
"B00"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 1"
)){
busid
=
"B01"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 2"
)){
busid
=
"B02"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 3"
)){
busid
=
"B03"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 7"
)){
busid
=
"B07"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 8"
)){
busid
=
"B08"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 9"
)){
busid
=
"B09"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 10"
)){
busid
=
"B010"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 11"
)){
busid
=
"B011"
;
}
else
if
(
select_bus
.
equalsIgnoreCase
(
"สาย 12"
)){
busid
=
"B012"
;
}
FirebaseDatabase
database
=
FirebaseDatabase
.
getInstance
();
DatabaseReference
myRef
=
database
.
getReference
(
"users/"
+
uid
);
myRef
.
child
(
"name"
).
setValue
(
name
);
myRef
.
child
(
"bus_
line"
).
setValue
(
name
);
myRef
.
child
(
"bus_
id"
).
setValue
(
busid
);
}
@Override
...
...
@@ -273,11 +321,15 @@ public class CreateAccountActivity extends AppCompatActivity implements ItemAdap
// for button sheet click
@Override
public
void
onItemClick
(
String
item
)
{
layout_MainMenu
.
getForeground
().
setAlpha
(
0
);
Snackbar
.
make
(
coordinatorLayout
,
item
+
" is selected"
,
Snackbar
.
LENGTH_LONG
)
.
setAction
(
"Action"
,
null
).
show
();
behavior
.
setState
(
BottomSheetBehavior
.
STATE_COLLAPSED
);
inputAddBus
.
setText
(
item
);
Log
.
d
(
TAG
,
"onItemClick: "
);
}
}
app/src/main/java/ubontransitdriver/paded/com/ubontransitdriver/MainActivity.java
View file @
d839d2e4
package
ubontransitdriver
.
paded
.
com
.
ubontransitdriver
;
import
android.content.Intent
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
com.google.firebase.auth.FirebaseAuth
;
import
com.google.firebase.auth.FirebaseUser
;
import
com.google.firebase.database.DataSnapshot
;
import
com.google.firebase.database.DatabaseError
;
import
com.google.firebase.database.DatabaseReference
;
import
com.google.firebase.database.FirebaseDatabase
;
import
com.google.firebase.database.ValueEventListener
;
import
com.h6ah4i.android.materialshadowninepatch.MaterialShadowContainerView
;
public
class
MainActivity
extends
AppCompatActivity
{
private
FirebaseAuth
auth
;
private
ImageButton
btn_profile
;
private
String
TAG
=
"mainAC"
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
main_layout
);
auth
=
FirebaseAuth
.
getInstance
();
FirebaseUser
user
=
auth
.
getCurrentUser
();
btn_profile
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_profile
);
DatabaseReference
database
=
FirebaseDatabase
.
getInstance
().
getReference
();
// Attach a listener to read the data at our posts reference
database
.
child
(
"users/"
+
user
.
getUid
()).
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
Log
.
d
(
TAG
,
"onDataChange: "
+
dataSnapshot
.
child
(
"name"
).
getValue
(
String
.
class
));
Log
.
d
(
TAG
,
"onDataChange: "
+
dataSnapshot
.
child
(
"bus_id"
).
getValue
(
String
.
class
));
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
System
.
out
.
println
(
"The read failed: "
+
databaseError
.
getCode
());
}
});
btn_profile
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
Intent
intent
=
new
Intent
(
MainActivity
.
this
,
ProfileSettingActivity
.
class
);
startActivity
(
intent
);
}
});
MaterialShadowContainerView
shadowView
=
(
MaterialShadowContainerView
)
findViewById
(
R
.
id
.
shadow_item_container
);
float
density
=
getResources
().
getDisplayMetrics
().
density
;
shadowView
.
setShadowTranslationZ
(
density
*
2.0f
);
// 2.0 dp
shadowView
.
setShadowElevation
(
density
*
4.0f
);
// 4.0 dp
//
// MaterialShadowContainerView shadowView =
// (MaterialShadowContainerView) findViewById(R.id.shadow_item_container);
//
// float density = getResources().getDisplayMetrics().density;
//
// shadowView.setShadowTranslationZ(density * 2.0f); // 2.0 dp
// shadowView.setShadowElevation(density * 4.0f); // 4.0 dp
}
...
...
app/src/main/java/ubontransitdriver/paded/com/ubontransitdriver/ProfileSettingActivity.java
0 → 100644
View file @
d839d2e4
package
ubontransitdriver
.
paded
.
com
.
ubontransitdriver
;
import
android.content.Intent
;
import
android.support.annotation.NonNull
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
android.widget.ProgressBar
;
import
com.google.firebase.auth.FirebaseAuth
;
import
com.google.firebase.auth.FirebaseUser
;
public
class
ProfileSettingActivity
extends
AppCompatActivity
{
private
ImageButton
btn_back
;
private
Button
btn_logout
;
private
FirebaseAuth
auth
;
private
String
TAG
=
"PST11"
;
private
ProgressBar
progressBar
;
private
FirebaseAuth
.
AuthStateListener
authListener
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
profile_setting_layout
);
btn_back
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_back
);
btn_logout
=
(
Button
)
findViewById
(
R
.
id
.
btn_logout
);
progressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
progressBar
);
//Get Firebase auth instance
auth
=
FirebaseAuth
.
getInstance
();
//get current user
final
FirebaseUser
user
=
FirebaseAuth
.
getInstance
().
getCurrentUser
();
authListener
=
new
FirebaseAuth
.
AuthStateListener
()
{
@Override
public
void
onAuthStateChanged
(
@NonNull
FirebaseAuth
firebaseAuth
)
{
FirebaseUser
user
=
firebaseAuth
.
getCurrentUser
();
if
(
user
==
null
)
{
progressBar
.
setVisibility
(
View
.
GONE
);
// user auth state is changed - user is null
// launch login activity
startActivity
(
new
Intent
(
ProfileSettingActivity
.
this
,
LoginActivity
.
class
));
finish
();
}
}
};
btn_back
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
finish
();
}
});
btn_logout
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
progressBar
.
setVisibility
(
View
.
VISIBLE
);
auth
.
signOut
();
}
});
}
@Override
public
void
onStart
()
{
super
.
onStart
();
auth
.
addAuthStateListener
(
authListener
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
if
(
authListener
!=
null
)
{
auth
.
removeAuthStateListener
(
authListener
);
}
}
}
app/src/main/res/drawable-hdpi/ic_return.png
0 → 100644
View file @
d839d2e4
429 Bytes
app/src/main/res/drawable-ldpi/ic_return.png
0 → 100644
View file @
d839d2e4
284 Bytes
app/src/main/res/drawable-mdpi/ic_return.png
0 → 100644
View file @
d839d2e4
360 Bytes
app/src/main/res/drawable-xhdpi/ic_return.png
0 → 100644
View file @
d839d2e4
611 Bytes
app/src/main/res/drawable-xxhdpi/ic_return.png
0 → 100644
View file @
d839d2e4
884 Bytes
app/src/main/res/drawable-xxxhdpi/ic_return.png
0 → 100644
View file @
d839d2e4
1.13 KB
app/src/main/res/drawable/bg_destination_driver.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/white"
/>
<corners
android:radius=
"8dp"
/>
<stroke
android:width=
"1dp"
android:color=
"#e7e8ea"
>
</stroke>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
android:right=
"7dip"
android:top=
"7dip"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_edittext_focused.xml
View file @
d839d2e4
...
...
@@ -2,6 +2,10 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/white"
/>
<corners
android:radius=
"8dp"
/>
<stroke
android:width=
"1dp"
android:color=
"#e7e8ea"
>
</stroke>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
...
...
app/src/main/res/drawable/bg_endtrip_bus.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_focused=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_endtrip_bus_clicked"
/>
<item
android:state_focused=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_endtrip_bus_clicked"
/>
<item
android:drawable=
"@drawable/bg_endtrip_bus_normal"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_endtrip_bus_clicked.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/gray_100"
/>
<corners
android:radius=
"8dp"
/>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
android:right=
"7dip"
android:top=
"7dip"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_endtrip_bus_normal.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/white"
/>
<corners
android:radius=
"8dp"
/>
<stroke
android:width=
"1dp"
android:color=
"#e7e8ea"
>
</stroke>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
android:right=
"7dip"
android:top=
"7dip"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_header_label.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/gray"
>
</solid>
<padding
android:left=
"10dp"
android:top=
"5dp"
android:right=
"10dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"12dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_logout.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_focused=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_logout_clicked"
/>
<item
android:state_focused=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_logout_clicked"
/>
<item
android:drawable=
"@drawable/bg_logout_normal"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_logout_clicked.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/gray_100"
>
</solid>
<!--<stroke-->
<!--android:width="2dp"-->
<!--android:color="#C4CDE0" >-->
<!--</stroke>-->
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"12dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_logout_normal.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"12dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_ongoing.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/green"
/>
<corners
android:radius=
"1dp"
android:bottomRightRadius=
"0dp"
android:bottomLeftRadius=
"0dp"
android:topLeftRadius=
"8dp"
android:topRightRadius=
"8dp"
/>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
android:right=
"7dip"
android:top=
"7dip"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_profile.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_focused=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_profile_clicked"
/>
<item
android:state_focused=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_profile_clicked"
/>
<item
android:drawable=
"@drawable/bg_profile_normal"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_profile_clicked.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/gray"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"360dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_profile_normal.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"360dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_return_bus.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_focused=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_return_bus_clicked"
/>
<item
android:state_focused=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/bg_return_bus_clicked"
/>
<item
android:drawable=
"@drawable/bg_return_bus_normal"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_return_bus_clicked.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/off_blue"
/>
<corners
android:radius=
"8dp"
/>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
android:right=
"7dip"
android:top=
"7dip"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_return_bus_normal.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/blue"
/>
<corners
android:radius=
"8dp"
/>
<padding
android:bottom=
"7dip"
android:left=
"7dip"
android:right=
"7dip"
android:top=
"7dip"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/btn_heading.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_focused=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/btn_heading_clicked"
/>
<item
android:state_focused=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/btn_heading_clicked"
/>
<item
android:drawable=
"@drawable/btn_heading_normal"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/btn_heading_clicked.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/gray_100"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"8dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/btn_heading_normal.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"12dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bus_color_icon_green.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/green"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"8dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bus_color_icon_red.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/red"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<corners
android:radius=
"8dp"
>
</corners>
</shape>
\ No newline at end of file
app/src/main/res/drawable/ic_close.xml
0 → 100644
View file @
d839d2e4
<vector
android:height=
"24dp"
android:viewportHeight=
"51.976"
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"
/>
</vector>
app/src/main/res/drawable/ic_frontal_bus_silhouette_white.xml
0 → 100644
View file @
d839d2e4
<vector
android:height=
"24dp"
android:viewportHeight=
"513.0"
android:viewportWidth=
"513.0"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"@color/white"
android:pathData=
"M453.5,78c-3.333,-14 -9,-24.667 -17,-32s-19.667,-14 -35,-20c-15.333,-6.667 -37.333,-12.667 -66,-18S280.666,0 257,0c-23.667,0 -49.833,2.667 -78.5,8s-50.667,11.333 -66,18c-15.333,6 -27,12.667 -35,20s-13.333,18 -16,32l-20,160v223h31v20c0,13.333 4.167,22.667 12.5,28s16.833,5.333 25.5,0s13,-14.667 13,-28v-20h256v20c0,13.333 5.167,22.667 15.5,28s20.5,5.333 30.5,0s15,-14.667 15,-28v-20h31V238L453.5,78zM150.5,38.5c2.667,-5 7.334,-7.5 14,-7.5h205v30h-205c-6.667,0 -11.333,-2.5 -14,-7.5S147.833,43.5 150.5,38.5zM77.5,234l17,-122c1.333,-6.667 7,-10 17,-10h293c10,0 15.667,3.333 17,10l17,124c0.667,2 1,3.333 1,4c0,4.667 -1.667,8.5 -5,11.5s-7.667,4.5 -13,4.5h-327c-5.333,0 -9.667,-1.667 -13,-5s-5,-7.667 -5,-13C76.5,236.667 76.833,235.333 77.5,234zM130.5,383.5c-6.667,6.333 -14.5,9.5 -23.5,9.5s-16.833,-3.167 -23.5,-9.5s-10,-14 -10,-23s3.333,-16.667 10,-23c6.667,-6.333 14.5,-9.5 23.5,-9.5s16.833,3.167 23.5,9.5s10,14 10,23S137.167,377.167 130.5,383.5zM432.5,383.5c-6.667,6.333 -14.5,9.5 -23.5,9.5s-16.833,-3.167 -23.5,-9.5s-10,-14 -10,-23s3.333,-16.667 10,-23S400,328 409,328s16.833,3.167 23.5,9.5s10,14 10,23S439.167,377.167 432.5,383.5z"
/>
</vector>
app/src/main/res/drawable/ic_menu_camera.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"
/>
</vector>
app/src/main/res/drawable/ic_menu_gallery.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z"
/>
</vector>
app/src/main/res/drawable/ic_menu_manage.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_menu_send.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"
/>
</vector>
app/src/main/res/drawable/ic_menu_share.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"
/>
</vector>
app/src/main/res/drawable/ic_menu_slideshow.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z"
/>
</vector>
app/src/main/res/drawable/ic_more_vert_black_24dp.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"@color/gray_600"
android:pathData=
"M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"
/>
</vector>
app/src/main/res/drawable/ic_person_dark_gray_24dp.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"@color/gray_900"
android:pathData=
"M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"
/>
</vector>
app/src/main/res/drawable/ic_person_gray_24dp.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"@color/gray_500"
android:pathData=
"M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"
/>
</vector>
app/src/main/res/drawable/ic_previous.xml
0 → 100644
View file @
d839d2e4
<vector
android:height=
"24dp"
android:viewportHeight=
"55.753"
android:viewportWidth=
"55.753"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"@color/gray_500"
android:pathData=
"M12.745,23.915c0.283,-0.282 0.59,-0.52 0.913,-0.727L35.266,1.581c2.108,-2.107 5.528,-2.108 7.637,0.001c2.109,2.108 2.109,5.527 0,7.637L24.294,27.828l18.705,18.706c2.109,2.108 2.109,5.526 0,7.637c-1.055,1.056 -2.438,1.582 -3.818,1.582s-2.764,-0.526 -3.818,-1.582L13.658,32.464c-0.323,-0.207 -0.632,-0.445 -0.913,-0.727c-1.078,-1.078 -1.598,-2.498 -1.572,-3.911C11.147,26.413 11.667,24.994 12.745,23.915z"
/>
</vector>
app/src/main/res/drawable/ic_start_black_24dp.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"@color/gray_900"
android:pathData=
"M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"
/>
</vector>
app/src/main/res/drawable/ic_stop_black_24dp.xml
0 → 100644
View file @
d839d2e4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"@color/gray_900"
android:pathData=
"M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"
/>
</vector>
app/src/main/res/drawable/side_nav_bar.xml
0 → 100644
View file @
d839d2e4
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
>
</solid>
<padding
android:left=
"5dp"
android:top=
"5dp"
android:right=
"5dp"
android:bottom=
"5dp"
>
</padding>
<!--<corners-->
<!--android:radius="8dp" >-->
<!--</corners>-->
</shape>
<!--<shape xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:shape="rectangle">-->
<!--<gradient-->
<!--android:angle="135"-->
<!--android:centerColor="#009688"-->
<!--android:endColor="#00695C"-->
<!--android:startColor="#4DB6AC"-->
<!--android:type="linear" />-->
<!--</shape>-->
\ No newline at end of file
app/src/main/res/layout/bottom_sheet_layout.xml
View file @
d839d2e4
...
...
@@ -14,12 +14,13 @@
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:drawablePadding=
"@dimen/activity_horizontal_margin"
android:textColor=
"@color/half_black"
android:textSize=
"18dp"
android:textStyle=
"bold"
android:textColor=
"@color/gray_900"
android:background=
"@drawable/bg_add_bus_menu"
android:drawableStart=
"@drawable/ic_frontal_bus_silhouette"
android:gravity=
"center_vertical"
android:padding=
"@dimen/activity_horizontal_margin"
android:text=
"@string/Bus_no0"
/>
android:padding=
"@dimen/activity_horizontal_margin"
/>
...
...
app/src/main/res/layout/create_account_layout.xml
View file @
d839d2e4
...
...
@@ -8,6 +8,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
android:background=
"@color/white"
tools:context=
".CreateAccountActivity"
>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
...
...
@@ -76,7 +77,23 @@
android:inputType=
"textPassword"
android:padding=
"15dp"
/>
<Button
<!--<View-->
<!--android:layout_marginTop="18dp"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="0.5dp"-->
<!--android:background="@color/gray"/>-->
<!--<TextView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:textColor="@color/blue"-->
<!--android:textSize="16dp"-->
<!--android:layout_marginTop="12dp"-->
<!--android:text="Add your bus"/>-->
<EditText
android:focusable=
"false"
android:id=
"@+id/btn_addBus"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"match_parent"
...
...
@@ -88,6 +105,7 @@
android:drawablePadding=
"10dp"
android:gravity=
"left|center_vertical"
android:padding=
"15dp"
android:textStyle=
"bold"
android:text=
"@string/add_bus_label"
android:textColor=
"@color/blue"
/>
...
...
@@ -158,16 +176,17 @@
android:layout_height=
"wrap_content"
android:text=
"Choose your bus"
android:paddingLeft=
"16dp"
android:textSize=
"16dp"
android:textColor=
"@color/gray_500"
android:textSize=
"17dp"
android:paddingTop=
"16dp"
android:textColor=
"@color/half_black"
android:textStyle=
"bold"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"
16
dp"
android:layout_marginTop=
"1
6
dp"
/>
android:layout_marginBottom=
"
0
dp"
android:layout_marginTop=
"1
8
dp"
/>
</LinearLayout>
...
...
app/src/main/res/layout/login_layout.xml
View file @
d839d2e4
...
...
@@ -5,6 +5,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:id=
"@+id/mainlayout"
android:background=
"@color/white"
tools:context=
".LoginActivity"
>
<LinearLayout
...
...
app/src/main/res/layout/main_layout.xml
View file @
d839d2e4
...
...
@@ -4,39 +4,299 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".MainActivity"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"MainActivity"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:padding=
"12dp"
tools:layout_editor_absoluteX=
"16dp"
tools:layout_editor_absoluteY=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"right"
>
<ImageButton
android:id=
"@+id/btn_profile"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:background=
"@drawable/bg_profile"
android:src=
"@drawable/ic_more_vert_black_24dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:padding=
"10dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_destination_driver"
android:orientation=
"vertical"
android:padding=
"0dp"
>
<!--<LinearLayout-->
<!--android:background="@drawable/bg_ongoing"-->
<!--android:padding="8dp"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content">-->
<!--<TextView-->
<!--android:text="On Going"-->
<!--android:textSize="18dp"-->
<!--android:textStyle="bold"-->
<!--android:textColor="@color/white"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content" />-->
<!--</LinearLayout>-->
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"15dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<!--<LinearLayout-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_gravity="center_vertical"-->
<!--android:layout_marginRight="25dp">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="On Going"-->
<!--android:textColor="@color/green"-->
<!--android:textSize="30dp"-->
<!--android:textStyle="bold" />-->
<!--</LinearLayout>-->
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/ic_start_circle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_toStartOf=
"@+id/text_start"
android:src=
"@drawable/ic_start_black_24dp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Start Location"
android:textColor=
"@color/gray_900"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Ubon Ratchathani"
android:textColor=
"@color/gray_600"
android:textSize=
"20dp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/ic_line"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toStartOf=
"@+id/text_start"
android:src=
"@drawable/ic_more_vert_black_24dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/ic_stop_circle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_toStartOf=
"@+id/text_start"
android:src=
"@drawable/ic_stop_black_24dp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Your Destination"
android:textColor=
"@color/gray_900"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Terminal Ubon"
android:textColor=
"@color/gray_600"
android:textSize=
"20dp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/gray_100"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:padding=
"15dp"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<RelativeLayout
android:layout_width=
"45dp"
android:layout_height=
"45dp"
android:background=
"@drawable/bus_color_icon_red"
android:padding=
"10dp"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/ic_frontal_bus_silhouette_white"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"16dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Your Bus"
android:textColor=
"@color/gray_500"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"สาย ม."
android:textStyle=
""
android:textSize=
"22dp"
android:textColor=
"@color/gray_900"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dip"
android:layout_weight=
"1"
android:gravity=
"center|bottom"
android:orientation=
"vertical"
>
<Button
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@drawable/bg_return_bus"
android:drawableRight=
"@drawable/ic_return"
android:gravity=
"left|center_vertical"
android:padding=
"15dp"
android:text=
"Return"
android:textColor=
"@color/white"
android:textSize=
"20dp"
android:textStyle=
"bold"
/>
<Button
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/bg_endtrip_bus"
android:drawableRight=
"@drawable/ic_close"
android:gravity=
"left|center_vertical"
android:padding=
"15dp"
android:text=
"End Trip"
android:textColor=
"@color/gray_500"
android:textSize=
"20dp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<!--<com.h6ah4i.android.materialshadowninepatch.MaterialShadowContainerView-->
<!--xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--xmlns:app="http://schemas.android.com/apk/res-auto"-->
<!--style="@style/ms9_DefaultShadowStyle"-->
<!--android:id="@+id/shadow_item_container"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--app:ms9_shadowTranslationZ="2dp"-->
<!--app:ms9_shadowElevation="4dp">-->
<!--<!– NOTE 1: only 1 child can be accepted –>-->
<!--<!– NOTE 2: margins are required to draw shadow properly –>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginLeft="8dp"-->
<!--android:layout_marginTop="8dp"-->
<!--android:layout_marginRight="8dp"-->
<!--android:layout_marginBottom="8dp"-->
<!--android:background="@android:color/white"-->
<!--android:text="Inner content view" />-->
<!--</com.h6ah4i.android.materialshadowninepatch.MaterialShadowContainerView>-->
\ No newline at end of file
app/src/main/res/layout/profile_setting_layout.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".ProfileSettingActivity"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:padding=
"12dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"left"
>
<ImageButton
android:id=
"@+id/btn_back"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:background=
"@drawable/bg_profile"
android:src=
"@drawable/ic_previous"
/>
<TextView
android:layout_marginLeft=
"8dp"
android:textSize=
"18dp"
android:text=
"Settings"
android:textColor=
"@color/gray_600"
android:textStyle=
"bold"
android:layout_gravity=
"center_vertical"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:paddingLeft=
"16dp"
android:paddingRight=
"16dp"
>
<Button
android:id=
"@+id/btn_logout"
android:textSize=
"25dp"
android:paddingLeft=
"12dp"
style=
"?android:attr/borderlessButtonStyle"
android:text=
"Log out"
android:gravity=
"left|center_vertical"
android:textAllCaps=
"false"
android:background=
"@drawable/bg_logout"
android:textColor=
"@color/gray_500"
android:textStyle=
"bold"
android:layout_gravity=
"center_vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
<LinearLayout
android:padding=
"10dp"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ProgressBar
android:id=
"@+id/progressBar"
android:layout_width=
"158dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center|bottom"
android:layout_marginBottom=
"20dp"
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/reset_password_layout.xml
View file @
d839d2e4
...
...
@@ -6,6 +6,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fillViewport=
"true"
android:background=
"@color/white"
tools:context=
".ResetPasswordActivity"
>
<RelativeLayout
...
...
app/src/main/res/menu/main2.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/action_settings"
android:orderInCategory=
"100"
android:title=
"@string/action_settings"
app:showAsAction=
"never"
/>
</menu>
app/src/main/res/menu/main2_layout_drawer.xml
0 → 100644
View file @
d839d2e4
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
tools:showIn=
"navigation_view"
>
<group
android:checkableBehavior=
"single"
>
<item
android:id=
"@+id/nav_camera"
android:icon=
"@drawable/ic_menu_camera"
android:title=
"Import"
/>
<item
android:id=
"@+id/nav_gallery"
android:icon=
"@drawable/ic_menu_gallery"
android:title=
"Gallery"
/>
<item
android:id=
"@+id/nav_slideshow"
android:icon=
"@drawable/ic_menu_slideshow"
android:title=
"Slideshow"
/>
<item
android:id=
"@+id/nav_manage"
android:icon=
"@drawable/ic_menu_manage"
android:title=
"Tools"
/>
</group>
<item
android:title=
"Communicate"
>
<menu>
<item
android:id=
"@+id/nav_share"
android:icon=
"@drawable/ic_menu_share"
android:title=
"Share"
/>
<item
android:id=
"@+id/nav_send"
android:icon=
"@drawable/ic_menu_send"
android:title=
"Send"
/>
</menu>
</item>
</menu>
app/src/main/res/values-v21/styles.xml
0 → 100644
View file @
d839d2e4
<resources></resources>
app/src/main/res/values/colors.xml
View file @
d839d2e4
...
...
@@ -6,6 +6,9 @@
<color
name=
"white"
>
#ffffff
</color>
<color
name=
"off_white"
>
#fafAFA
</color>
<color
name=
"off_white_100"
>
#F5F5F5
</color>
<color
name=
"off_white_200"
>
#EEEEEE
</color>
<color
name=
"blue"
>
#007aff
</color>
<color
name=
"off_blue"
>
#006ee7
</color>
...
...
@@ -19,6 +22,10 @@
<color
name=
"gray_100"
>
#F5F5F5
</color>
<color
name=
"gray_500"
>
#9E9E9E
</color>
<color
name=
"gray_400"
>
#BDBDBD
</color>
<color
name=
"gray_600"
>
#757575
</color>
<color
name=
"gray_900"
>
#212121
</color>
...
...
app/src/main/res/values/dimens.xml
View file @
d839d2e4
...
...
@@ -2,5 +2,8 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen
name=
"activity_horizontal_margin"
>
16dp
</dimen>
<dimen
name=
"activity_vertical_margin"
>
16dp
</dimen>
<dimen
name=
"nav_header_vertical_spacing"
>
8dp
</dimen>
<dimen
name=
"nav_header_height"
>
176dp
</dimen>
<dimen
name=
"fab_margin"
>
16dp
</dimen>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
d839d2e4
...
...
@@ -12,7 +12,7 @@
<!--Label-->
<string
name=
"create_account_label"
>
Create your account
</string>
<string
name=
"add_bus_label"
>
Pick your b
us
</string>
<string
name=
"add_bus_label"
>
Add Your B
us
</string>
<string
name=
"login_label"
>
Login
</string>
<string
name=
"forgot_password_label"
>
Forgot password?
</string>
<string
name=
"forgot_password_msg"
>
We just need your registered Email Id to sent you password reset instructions.
</string>
...
...
@@ -24,19 +24,13 @@
<string
name=
"send_password_reset_email"
>
Send Password reset email
</string>
<string
name=
"send_password_reset_success_msg"
>
We have sent you instructions to reset your password!
</string>
<string
name=
"send_password_reset_failed_msg"
>
Failed to send reset email!
</string>
<!--Bus stop-->
<string
name=
"Bus_no0"
>
ม.
</string>
<string
name=
"Bus_no1"
>
1
</string>
<string
name=
"Bus_no2"
>
สาย 2
</string>
<string
name=
"Bus_no3"
>
สาย 3
</string>
<string
name=
"Bus_no4"
>
สาย 7
</string>
<string
name=
"Bus_no5"
>
สาย 8
</string>
<string
name=
"Bus_no6"
>
สาย 9
</string>
<string
name=
"Bus_no7"
>
สาย 10
</string>
<string
name=
"Bus_no8"
>
สาย 11
</string>
<string
name=
"Bus_no9"
>
สาย 12
</string>
<string
name=
"title_activity_main2"
>
Main2Activity
</string>
<string
name=
"navigation_drawer_open"
>
Open navigation drawer
</string>
<string
name=
"navigation_drawer_close"
>
Close navigation drawer
</string>
<string
name=
"nav_header_title"
>
Android Studio
</string>
<string
name=
"nav_header_subtitle"
>
android.studio@android.com
</string>
<string
name=
"nav_header_desc"
>
Navigation header
</string>
<string
name=
"action_settings"
>
Settings
</string>
</resources>
app/src/main/res/values/styles.xml
View file @
d839d2e4
...
...
@@ -3,21 +3,43 @@
<!-- Base application theme. -->
<style
name=
"AppTheme"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/
off_
white
</item>
<item
name=
"colorPrimaryDark"
>
@color/
off_
white
</item>
<item
name=
"colorPrimary"
>
@color/white
</item>
<item
name=
"colorPrimaryDark"
>
@color/white
</item>
<item
name=
"android:windowLightStatusBar"
>
true
</item>
<!--<item name="android:windowTranslucentStatus">true</item>-->
<!--<item name="android:windowTranslucentNavigation">true</item>-->
</style>
<style
name=
"AppTheme2"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/white
</item>
<item
name=
"colorPrimaryDark"
>
@color/white
</item>
<item
name=
"android:windowTranslucentStatus"
>
true
</item>
<item
name=
"android:windowTranslucentNavigation"
>
true
</item>
</style>
<!-- Base application theme. -->
<style
name=
"AppThemeActionbar"
parent=
"Theme.AppCompat.Light.DarkActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/
off_
white
</item>
<item
name=
"colorPrimaryDark"
>
@color/
off_
white
</item>
<item
name=
"colorPrimary"
>
@color/white
</item>
<item
name=
"colorPrimaryDark"
>
@color/white
</item>
<item
name=
"android:windowLightStatusBar"
>
true
</item>
</style>
<style
name=
"SplashTheme"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<item
name=
"android:windowBackground"
>
@drawable/bg_splash
</item>
</style>
<style
name=
"MyAppTheme"
parent=
"android:Theme.Holo.Light"
>
<item
name=
"elevation"
>
0dp
</item>
</style>
<style
name=
"AppTheme.AppBarOverlay"
parent=
"ThemeOverlay.AppCompat.Dark.ActionBar"
/>
<style
name=
"AppTheme.PopupOverlay"
parent=
"ThemeOverlay.AppCompat.Light"
>
<item
name=
"colorPrimaryDark"
>
@color/red
</item>
</style>
</resources>
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