Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
addb234
commit 960a8d6
Showing
8 changed files
with
225 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
Android/app/src/main/java/io/github/project_travel_mate/HomeFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.github.project_travel_mate; | ||
|
||
import android.app.Activity; | ||
import android.content.Context; | ||
import android.os.Bundle; | ||
import android.support.v4.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
public class HomeFragment extends Fragment { | ||
|
||
private Activity mActivity; | ||
|
||
public HomeFragment() { | ||
} | ||
|
||
public static HomeFragment newInstance() { | ||
HomeFragment fragment = new HomeFragment(); | ||
return fragment; | ||
} | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
View rootview = inflater.inflate(R.layout.fragment_home, container, false); | ||
return rootview; | ||
} | ||
|
||
@Override | ||
public void onAttach(Context context) { | ||
super.onAttach(context); | ||
this.mActivity = (Activity) context; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<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="#FF000000" | ||
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/> | ||
</vector> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
<?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" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<android.support.design.card.MaterialCardView | ||
android:id="@+id/materialCardView21" | ||
android:layout_width="150dp" | ||
android:layout_height="149dp" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginEnd="16dp" | ||
android:elevation="10dp" | ||
app:cardCornerRadius="10.0dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".7" | ||
android:src="@drawable/friends" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".3" | ||
android:gravity="center_horizontal" | ||
android:text="Friends" | ||
android:textSize="25sp" /> | ||
</LinearLayout> | ||
|
||
</android.support.design.card.MaterialCardView> | ||
|
||
<android.support.design.card.MaterialCardView | ||
android:id="@+id/materialCardView2" | ||
android:layout_width="150dp" | ||
android:layout_height="149dp" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginEnd="8dp" | ||
android:elevation="10dp" | ||
app:cardCornerRadius="10.0dp" | ||
app:layout_constraintEnd_toEndOf="@+id/materialCardView3" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".7" | ||
android:src="@drawable/hotel" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".3" | ||
android:gravity="center_horizontal" | ||
android:text="Hotels" | ||
android:textColor="@color/black" | ||
android:textSize="25sp" /> | ||
</LinearLayout> | ||
|
||
</android.support.design.card.MaterialCardView> | ||
|
||
<android.support.design.card.MaterialCardView | ||
android:layout_width="150dp" | ||
android:layout_height="149dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginEnd="16dp" | ||
android:elevation="10dp" | ||
app:cardCornerRadius="10.0dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/materialCardView21"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".7" | ||
android:src="@drawable/popular_cities" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".3" | ||
android:gravity="center_horizontal" | ||
android:text="Popular cities" | ||
android:textSize="20sp" /> | ||
</LinearLayout> | ||
|
||
</android.support.design.card.MaterialCardView> | ||
|
||
<android.support.design.card.MaterialCardView | ||
android:id="@+id/materialCardView3" | ||
android:layout_width="150dp" | ||
android:layout_height="149dp" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="20dp" | ||
android:elevation="10dp" | ||
app:cardCornerRadius="10.0dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/materialCardView2"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".7" | ||
android:src="@drawable/upcoming_long_weekends" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".3" | ||
android:gravity="center_horizontal" | ||
android:text="Trips" | ||
android:textSize="25sp" /> | ||
</LinearLayout> | ||
|
||
</android.support.design.card.MaterialCardView> | ||
|
||
<android.support.design.card.MaterialCardView | ||
android:layout_width="150dp" | ||
android:layout_height="149dp" | ||
android:layout_marginEnd="116dp" | ||
android:layout_marginBottom="28dp" | ||
android:elevation="10dp" | ||
app:cardCornerRadius="10.0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".7" | ||
android:src="@drawable/utilities" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight=".3" | ||
android:gravity="center_horizontal" | ||
android:text="Utilities" | ||
android:textSize="25sp" /> | ||
</LinearLayout> | ||
|
||
</android.support.design.card.MaterialCardView> | ||
</android.support.constraint.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters