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

Home Fragment #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand Down
38 changes: 29 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dscnitp.touristshelperapp" >
package="com.dscnitp.touristshelperapp">

<uses-permission android:name="android.permission.INTERNET" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the "MyLocation" functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<user-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity android:name=".SplashScreen" >
android:theme="@style/AppTheme">

<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />

<activity android:name=".SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Google_Sign_in" />
<activity android:name=".bottom_bar">

</activity>
<activity android:name=".bottom_bar" />
<activity android:name=".MainActivity" />
<activity android:name=".homeActivity" />
<activity android:name=".LoginScreen" >
</activity>
<activity android:name=".LoginScreen" />

<meta-data
android:name="preloaded_fonts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

/**
* A simple {@link Fragment} subclass.
* Use the {@link MapsFragment#newInstance} factory method to
* Use the {@link home_page#newInstance} factory method to
* create an instance of this fragment.
*/
public class MapsFragment extends Fragment {
public class home_page extends Fragment {

// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
Expand All @@ -24,7 +24,7 @@ public class MapsFragment extends Fragment {
private String mParam1;
private String mParam2;

public MapsFragment() {
public home_page() {
// Required empty public constructor
}

Expand All @@ -34,11 +34,11 @@ public MapsFragment() {
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment MapsFragment.
* @return A new instance of fragment home_page.
*/
// TODO: Rename and change types and number of parameters
public static MapsFragment newInstance(String param1, String param2) {
MapsFragment fragment = new MapsFragment();
public static home_page newInstance(String param1, String param2) {
home_page fragment = new home_page();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
Expand All @@ -59,6 +59,6 @@ public void onCreate(Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_maps, container, false);
return inflater.inflate(R.layout.fragment_home_page, container, false);
}
}
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/empty_tall_divider.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:height="0dp"
android:width="19dp"/>
</shape>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/map_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="23dp" android:viewportHeight="512"
android:viewportWidth="512" android:width="23dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M256,0C153.755,0 70.573,83.182 70.573,185.426c0,126.888 165.939,313.167 173.004,321.035c6.636,7.391 18.222,7.378 24.846,0c7.065,-7.868 173.004,-194.147 173.004,-321.035C441.425,83.182 358.244,0 256,0zM256,469.729c-55.847,-66.338 -152.035,-197.217 -152.035,-284.301c0,-83.834 68.202,-152.036 152.035,-152.036s152.035,68.202 152.035,152.035C408.034,272.515 311.861,403.37 256,469.729z"/>
<path android:fillColor="#FF000000" android:pathData="M256,92.134c-51.442,0 -93.292,41.851 -93.292,93.293s41.851,93.293 93.292,93.293s93.291,-41.851 93.291,-93.293S307.441,92.134 256,92.134zM256,245.328c-33.03,0 -59.9,-26.871 -59.9,-59.901s26.871,-59.901 59.9,-59.901s59.9,26.871 59.9,59.901S289.029,245.328 256,245.328z"/>
</vector>
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/map_rectangle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="411dp"
android:height="291dp"
android:viewportWidth="411"
android:viewportHeight="291">
<group>

<clip-path
android:pathData="M0 0H411V291H0V0Z"
/>

</group>

</vector>
Binary file added app/src/main/res/drawable/pic1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions app/src/main/res/drawable/rec_loc_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="360dp"
android:height="50dp"
android:viewportWidth="360"
android:viewportHeight="50">
<group>

<clip-path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
/>

<path
android:pathData="M0 0V50H360V0"
android:fillColor="#33FBBC05"
/>

<path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
android:strokeWidth="2"
android:strokeColor="#FBBC05"
/>
</group>

</vector>
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/rec_loc_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="360dp"
android:height="50dp"
android:viewportWidth="360"
android:viewportHeight="50"
>
<group>

<clip-path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
/>

<path
android:pathData="M0 0V50H360V0"
android:fillColor="#80536DFE"
/>

<path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
android:strokeWidth="2"
android:strokeColor="#C3CFD9"
/>

</group>

</vector>
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/rec_loc_3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="360dp"
android:height="50dp"
android:viewportWidth="360"
android:viewportHeight="50"
>
<group>

<clip-path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
/>

<path
android:pathData="M0 0V50H360V0"
android:fillColor="#8034A853"
/>

<path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
android:strokeWidth="2"
android:strokeColor="#C3CFD9"
/>

</group>

</vector>
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/rec_loc_4.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="360dp"
android:height="50dp"
android:viewportWidth="360"
android:viewportHeight="50"
>
<group>

<clip-path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
/>

<path
android:pathData="M0 0V50H360V0"
android:fillColor="#80F223D1"
/>

<path
android:pathData="M6 0H354C357.314 0 360 2.68629 360 6V44C360 47.3137 357.314 50 354 50H6C2.68629 50 0 47.3137 0 44V6C0 2.68629 2.68629 0 6 0Z"
android:strokeWidth="2"
android:strokeColor="#C3CFD9"
/>

</group>

</vector>
Loading