Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uBus
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chiara Veronica Señires
uBus
Commits
bd26fcdd
Commit
bd26fcdd
authored
9 years ago
by
ejcris
Browse files
Options
Browse Files
Download
Plain Diff
No changes made
parents
f97446a9
d9d26fdd
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
273 additions
and
39 deletions
+273
-39
misc.xml
mobile-app/10-31-15/Project/.idea/misc.xml
+4
-0
AndroidManifest.xml
mobile-app/10-31-15/Project/app/src/main/AndroidManifest.xml
+10
-7
ActionBarAttempt.java
...ava/com/example/pearlsantos/project/ActionBarAttempt.java
+37
-31
Help.java
...p/src/main/java/com/example/pearlsantos/project/Help.java
+1
-1
SearchFragment.java
.../java/com/example/pearlsantos/project/SearchFragment.java
+43
-0
TimePicker.java
...main/java/com/example/pearlsantos/project/TimePicker.java
+36
-0
activity_time_picker.xml
.../Project/app/src/main/res/layout/activity_time_picker.xml
+9
-0
dummylayout.xml
.../10-31-15/Project/app/src/main/res/layout/dummylayout.xml
+12
-0
fragment_search.xml
...31-15/Project/app/src/main/res/layout/fragment_search.xml
+111
-0
menu_time_picker.xml
...-31-15/Project/app/src/main/res/menu/menu_time_picker.xml
+7
-0
strings.xml
...-app/10-31-15/Project/app/src/main/res/values/strings.xml
+3
-0
No files found.
mobile-app/10-31-15/Project/.idea/misc.xml
View file @
bd26fcdd
...
...
@@ -37,7 +37,11 @@
<ConfirmationsSetting
value=
"0"
id=
"Add"
/>
<ConfirmationsSetting
value=
"0"
id=
"Remove"
/>
</component>
<<<<<<
< HEAD
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_7"
default=
"true"
assert-keyword=
"true"
jdk-15=
"true"
project-jdk-name=
"1.7"
project-jdk-type=
"JavaSDK"
>
=======
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
default=
"true"
assert-keyword=
"true"
jdk-15=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
>>>>>>> d9d26fdd3d05d7a9728d40b1182198cc715c10ae
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/AndroidManifest.xml
View file @
bd26fcdd
...
...
@@ -4,10 +4,11 @@
<application
android:allowBackup=
"true"
android:icon=
"@mipmap/ubus_logo_final"
android:label=
"@string/app_name"
android:theme=
"@style/AppTheme"
android:icon=
"@mipmap/ubus_logo_final"
>
<!--
android:icon="@mipmap/logo"
-->
android:theme=
"@style/AppTheme"
>
<!--
android:icon="@mipmap/logo"
-->
<activity
android:name=
".Login_Screen"
...
...
@@ -16,6 +17,7 @@
<meta-data
android:name=
"android.support.PARENT_ACTIVITY"
android:value=
".SignUp"
/>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -25,8 +27,7 @@
<activity
android:name=
".ActionBarAttempt"
android:label=
"@string/app_name"
android:parentActivityName=
".Login_Screen"
>
android:parentActivityName=
".Login_Screen"
>
<meta-data
android:name=
"android.support.PARENT_ACTIVITY"
android:value=
".Login_Screen"
/>
...
...
@@ -39,8 +40,10 @@
android:name=
"android.support.PARENT_ACTIVITY"
android:value=
".Login_Screen"
/>
</activity>
<activity
android:name=
".TimePicker"
android:label=
"@string/title_activity_time_picker"
>
</activity>
</application>
</manifest>
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/java/com/example/pearlsantos/project/ActionBarAttempt.java
View file @
bd26fcdd
...
...
@@ -6,6 +6,7 @@ import android.content.Intent;
import
android.content.res.Configuration
;
import
android.graphics.drawable.Drawable
;
import
android.support.v4.app.ActionBarDrawerToggle
;
import
android.support.v4.app.FragmentActivity
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.content.res.ResourcesCompat
;
import
android.support.v4.view.GravityCompat
;
...
...
@@ -122,32 +123,32 @@ public class ActionBarAttempt extends AppCompatActivity {
if
(
mDrawerToggle
.
onOptionsItemSelected
(
item
))
{
return
true
;
}
Fragment
fragment
=
null
;
Bundle
args
=
new
Bundle
();
FragmentManager
fragmentManager
=
null
;
// Handle action buttons
switch
(
item
.
getItemId
())
{
case
R
.
id
.
action_search
:
//insert what needs to be done when chosen
return
true
;
case
R
.
id
.
action_aboutUs
:
fragment
=
new
About
();
fragmentManager
=
getSupportFragmentManager
();
fragmentManager
.
beginTransaction
().
replace
(
R
.
id
.
content_frame
,
fragment
).
commit
();
return
true
;
case
R
.
id
.
action_help
:
fragment
=
new
Help
();
fragmentManager
=
getSupportFragmentManager
();
fragmentManager
.
beginTransaction
().
replace
(
R
.
id
.
content_frame
,
fragment
).
commit
();
return
true
;
case
R
.
id
.
action_settings
:
//insert what needs to be done when chosen
return
true
;
default
:
return
super
.
onOptionsItemSelected
(
item
);
}
//
Fragment fragment = null;
//
Bundle args = new Bundle();
//
FragmentManager fragmentManager = null;
//
// Handle action buttons
//
switch(item.getItemId()) {
//
case R.id.action_search:
//
//insert what needs to be done when chosen
//
return true;
//
case R.id.action_aboutUs:
//
fragment = new About();
//
fragmentManager = getSupportFragmentManager();
//
fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
//
return true;
//
case R.id.action_help:
//
fragment = new Help();
//
fragmentManager = getSupportFragmentManager();
//
fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
//
return true;
//
case R.id.action_settings:
//
//insert what needs to be done when chosen
//
return true;
//
default:
//
return super.onOptionsItemSelected(item);
//
}
return
true
;
}
/* The click listner for ListView in the navigation drawer */
...
...
@@ -165,19 +166,24 @@ public class ActionBarAttempt extends AppCompatActivity {
switch
(
position
){
case
0
:
fragment
=
new
Schedules
();
Fragment
fa
=
new
SearchFragment
();
break
;
case
1
:
fragment
=
new
ChangeInfoFragment
();
fragment
=
new
Schedules
();
break
;
case
2
:
fragment
=
new
PastTrips
();
fragment
=
new
ChangeInfoFragment
();
break
;
case
3
:
fragment
=
new
Help
();
fragment
=
new
PastTrips
();
break
;
case
4
:
fragment
=
new
About
();
//must be changed for dialog
//settings
fragment
=
new
Help
();
break
;
case
5
:
//logout
fragment
=
new
Help
();
break
;
default
:
break
;
...
...
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/java/com/example/pearlsantos/project/Help.java
View file @
bd26fcdd
...
...
@@ -17,7 +17,7 @@ public class Help extends Fragment {
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
rootView
=
inflater
.
inflate
(
R
.
layout
.
fragment_ab
out
,
container
,
false
);
View
rootView
=
inflater
.
inflate
(
R
.
layout
.
dummylay
out
,
container
,
false
);
return
rootView
;
}
}
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/java/com/example/pearlsantos/project/SearchFragment.java
0 → 100644
View file @
bd26fcdd
package
com
.
example
.
pearlsantos
.
project
;
import
android.app.TimePickerDialog
;
import
android.support.v4.app.DialogFragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentActivity
;
import
android.support.v4.app.FragmentManager
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.DigitalClock
;
/**
* A placeholder fragment containing a simple view.
*/
public
class
SearchFragment
extends
Fragment
{
public
SearchFragment
()
{
}
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
SavedInstance
)
{
View
rootView
=
inflater
.
inflate
(
R
.
layout
.
fragment_search
,
container
,
false
);
DigitalClock
clk
=
(
DigitalClock
)
rootView
.
findViewById
(
R
.
id
.
digitalClock
);
clk
.
setOnClickListener
(
new
View
.
OnClickListener
(){
@Override
public
void
onClick
(
View
v
)
{
TimePicker
newDialog
=
new
TimePicker
();
newDialog
.
show
(
getActivity
().
getSupportFragmentManager
(),
"timePicker"
);
}
});
return
rootView
;
}
}
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/java/com/example/pearlsantos/project/TimePicker.java
0 → 100644
View file @
bd26fcdd
package
com
.
example
.
pearlsantos
.
project
;
import
android.app.Dialog
;
import
android.app.TimePickerDialog
;
import
android.support.v4.app.DialogFragment
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.text.format.DateFormat
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
java.util.Calendar
;
public
class
TimePicker
extends
DialogFragment
implements
TimePickerDialog
.
OnTimeSetListener
{
@Override
public
Dialog
onCreateDialog
(
Bundle
savedInstanceState
){
final
Calendar
c
=
Calendar
.
getInstance
();
int
hour
=
c
.
get
(
Calendar
.
HOUR_OF_DAY
);
int
minute
=
c
.
get
(
Calendar
.
MINUTE
);
return
new
TimePickerDialog
(
getActivity
(),
this
,
hour
,
minute
,
DateFormat
.
is24HourFormat
(
getActivity
()));
}
@Override
public
void
onTimeSet
(
android
.
widget
.
TimePicker
view
,
int
hourOfDay
,
int
minute
)
{
//hi EJ, I think this is where you put what you want to do with the time the user picks. Just tell me if you need help
//actually, here's one thing you can do, since I kinda forgot how to SharedPreferences
//1) get the time set using this time picker
//2) send it to SearchFragment
//3) set the digital clock to the said time
//4) other things you need to do :)
}
}
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/res/layout/activity_time_picker.xml
0 → 100644
View file @
bd26fcdd
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingLeft=
"@dimen/activity_horizontal_margin"
android:paddingRight=
"@dimen/activity_horizontal_margin"
android:paddingTop=
"@dimen/activity_vertical_margin"
android:paddingBottom=
"@dimen/activity_vertical_margin"
tools:context=
"com.example.pearlsantos.project.TimePicker"
>
</RelativeLayout>
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/res/layout/dummylayout.xml
0 → 100644
View file @
bd26fcdd
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Coming Soon"
android:id=
"@+id/textView3"
android:layout_gravity=
"center_horizontal"
/>
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/res/layout/fragment_search.xml
0 → 100644
View file @
bd26fcdd
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingLeft=
"@dimen/activity_horizontal_margin"
android:paddingRight=
"@dimen/activity_horizontal_margin"
android:paddingTop=
"@dimen/activity_vertical_margin"
android:paddingBottom=
"@dimen/activity_vertical_margin"
tools:context=
"com.example.pearlsantos.project.SearchFragment"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"fill_parent"
android:orientation=
"vertical"
android:layout_gravity=
"center"
android:layout_marginLeft=
"30dp"
android:layout_marginRight=
"30dp"
android:layout_marginTop=
"10dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textAppearance=
"?android:attr/textAppearanceLarge"
android:text=
"Saan ka pupunta?"
android:layout_marginBottom=
"5dp"
android:id=
"@+id/destinationLabel"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:text=
"GALING"
android:id=
"@+id/fromLabelSearch"
android:layout_marginBottom=
"5dp"
/>
<EditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Pangunahing Terminal"
android:id=
"@+id/fromSearch"
android:layout_marginBottom=
"5dp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:text=
"PAPUNTANG"
android:id=
"@+id/toLabelSearch"
android:layout_marginBottom=
"5dp"
/>
<EditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Destinasyon"
android:id=
"@+id/toSearch"
android:layout_marginBottom=
"5dp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:text=
"BUS LINER"
android:id=
"@+id/busLinersLabel"
android:layout_marginBottom=
"5dp"
/>
<Spinner
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/busLiners"
android:layout_marginBottom=
"5dp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:text=
"ANONG ORAS?"
android:id=
"@+id/timeLabel"
android:layout_marginBottom=
"5dp"
/>
<DigitalClock
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:textAppearance=
"?android:attr/textAppearanceLarge"
android:id=
"@+id/digitalClock"
android:onClick=
"showTimeDialog"
/>
<LinearLayout
android:layout_height=
"wrap_content"
android:layout_width=
"match_parent"
android:orientation=
"horizontal"
android:gravity=
"right"
>
<Button
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"ULITIN"
android:id=
"@+id/reset"
android:layout_gravity=
"center_horizontal"
/>
<Button
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"HANAPIN"
android:id=
"@+id/searchFor"
android:layout_gravity=
"center_horizontal"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/res/menu/menu_time_picker.xml
0 → 100644
View file @
bd26fcdd
<menu
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"
tools:context=
"com.example.pearlsantos.project.TimePicker"
>
<item
android:id=
"@+id/action_settings"
android:title=
"@string/action_settings"
android:orderInCategory=
"100"
app:showAsAction=
"never"
/>
</menu>
This diff is collapsed.
Click to expand it.
mobile-app/10-31-15/Project/app/src/main/res/values/strings.xml
View file @
bd26fcdd
...
...
@@ -8,6 +8,7 @@
<string
name=
"drawer_open"
>
open
</string>
<string
name=
"drawer_close"
>
close
</string>
<string-array
name=
"options"
>
<item>
Search
</item>
<item>
Schedules
</item>
<item>
Edit Profile
</item>
<item>
View Past Trips
</item>
...
...
@@ -24,4 +25,6 @@
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
<string
name=
"title_activity_change_info_fragment"
>
ChangeInfoFragment
</string>
<string
name=
"title_activity_past_trips"
>
PastTrips
</string>
<string
name=
"title_activity_search"
>
Search
</string>
<string
name=
"title_activity_time_picker"
>
TimePicker
</string>
</resources>
This diff is collapsed.
Click to expand it.
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