Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'Offline Maps' to Navigation Drawer #545

Closed
wants to merge 16 commits into from
Closed
24 changes: 24 additions & 0 deletions .idea/Travel-Mate.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

178 changes: 178 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ private Fragment getFragmentByNavMenuItemId(int id) {
case R.id.nav_utility:
fragment = UtilitiesFragment.newInstance();
break;

//Work In Progress Offline Maps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it work in progress or done?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a work in progress for the MainActivity.java file as I'm still trying to figure out how the feature should be implemented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Swati4star Hey, just cleaned up this branch for the merging process. Please review it again, thanks!

case R.id.nav_offlinemaps:
break;
case R.id.nav_about_us:
fragment = AboutUsFragment.newInstance();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

mCityAdapter.updateData(mCities);

if (mSpotlightShownCount <= 3) {
if (mSpotlightShownCount <= 4) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, this was an experimentation I was doing on trying to solve the #539 issue.

showSpotlightView(mSpotView);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.github.project_travel_mate.utilities;

import android.content.Intent;
import android.support.v4.app.Fragment;

import adapters.CardViewOptionsAdapter;

public class OfflineMapsFragment extends Fragment implements CardViewOptionsAdapter.OnItemClickListener {
@Override
public void onItemClick(int position) {
Intent intent;
}
}
Binary file added Android/app/src/main/res/drawable/ic_maps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions Android/app/src/main/res/layout/city_history_listitem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp">
android:orientation="vertical"
jtj9817 marked this conversation as resolved.
Show resolved Hide resolved
android:paddingEnd="5dp"
android:paddingStart="5dp">

<TextView
android:id="@+id/heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="18sp"
android:textColor="@color/black"
android:id="@+id/heading"/>
android:textSize="18sp"
android:textStyle="bold" />

<utils.ExpandableTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/text"
android:textColor="@color/black"
android:textSize="14sp"/>
android:textSize="14sp" />

<View
android:layout_width="fill_parent"
android:layout_height="1dp"
Expand Down
9 changes: 9 additions & 0 deletions Android/app/src/main/res/layout/fragment_offlinemaps.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<android.widget.ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
android:id="@+id/offlinemaps_list_recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.widget.ScrollView>
8 changes: 7 additions & 1 deletion Android/app/src/main/res/menu/activity_main_drawer.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<group android:checkableBehavior="single" android:id="@+id/nav_grp1">
<group
android:id="@+id/nav_grp1"
android:checkableBehavior="single">
<item
android:id="@+id/nav_city"
android:icon="@drawable/ic_location_city_black"
Expand All @@ -22,6 +24,10 @@
android:id="@+id/nav_utility"
android:icon="@drawable/ic_utilities"
android:title="@string/navigation_drawer_utilities" />
<item
android:id="@+id/nav_offlinemaps"
android:icon="@drawable/ic_maps"
android:title="@string/navigation_drawer_offlinemaps" />

</group>

Expand Down
1 change: 1 addition & 0 deletions Android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<string name="navigation_drawer_destination">Destinations</string>
<string name="navigation_drawer_travel">Travel</string>
<string name="navigation_drawer_utilities">Utilities</string>
<string name="navigation_drawer_offlinemaps">Offline Maps</string>
<string name="navigation_drawer_about_us">About Us</string>
<string name="navigation_drawer_signout">Sign Out</string>
<string name="navigation_drawer_my_friends">My Friends</string>
Expand Down