Initial commit

This commit is contained in:
2017-06-05 17:10:53 +01:00
commit 61988c81a7
38 changed files with 747 additions and 0 deletions

1
app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

29
app/build.gradle Normal file
View File

@@ -0,0 +1,29 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.h_mal.udacityproject_hmal"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
}

17
app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\h_mal\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@@ -0,0 +1,26 @@
package com.example.h_mal.udacityproject_hmal;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.h_mal.udacityproject_hmal", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.h_mal.udacityproject_hmal">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,13 @@
package com.example.h_mal.udacityproject_hmal;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 KiB

View File

@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="15dp"
android:paddingTop="15dp"
android:paddingRight="15dp"
android:paddingLeft="15dp"
android:src="@android:color/background_light"
tools:context="com.example.h_mal.udacityproject_hmal.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/water"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="36sp"
android:textStyle="bold"
android:fontFamily="sans-serif"
android:id="@+id/header"
android:paddingLeft="10dp"
android:paddingBottom="10dp"
android:text="H's Tours"
android:textColor="@color/colorPrimaryDark"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/desert"
android:scaleType="centerCrop"
android:id="@+id/Iran"
android:layout_below="@+id/littleheader"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="10dp" />
<TextView
android:id="@+id/IranText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/colorPrimary"
android:layout_marginLeft="10dp"
android:layout_below="@+id/littleheader"
android:layout_toRightOf="@id/Iran"
android:text="Iran"/>
<TextView
android:id="@+id/IranLocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="italic"
android:textColor="@android:color/black"
android:layout_marginLeft="10dp"
android:layout_below="@+id/IranText"
android:layout_toRightOf="@id/Iran"
android:text="Dasht-e Kavir"/>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/croatia"
android:scaleType="centerCrop"
android:id="@+id/Croatia"
android:layout_marginTop="20dp"
android:layout_below="@+id/Iran"
android:layout_alignLeft="@+id/Iran"
android:layout_alignStart="@+id/Iran" />
<TextView
android:id="@+id/CroatiaHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"
android:text="Croatia"
android:layout_alignTop="@+id/Croatia"
android:layout_alignLeft="@+id/IranLocation"
android:layout_alignStart="@+id/IranLocation" />
<TextView
android:id="@+id/IranAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:text="Dasht-e Kavir, Tabas, South Khorasan Province, Iran"
android:layout_below="@+id/IranLocation"
android:layout_alignLeft="@+id/IranLocation"
android:layout_alignStart="@+id/IranLocation" />
<TextView
android:id="@+id/CroatiaLocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginLeft="10dp"
android:textStyle="italic"
android:layout_below="@id/CroatiaHeader"
android:layout_toRightOf="@id/Croatia"
android:text="Mljet National park" />
<TextView
android:id="@+id/CroatiaAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="20226, Pomena, Croatia"
android:textColor="@android:color/black"
android:layout_below="@+id/CroatiaLocation"
android:layout_alignLeft="@+id/IranLocation"
android:layout_alignStart="@+id/IranLocation" />
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/samaria"
android:scaleType="centerCrop"
android:layout_below="@+id/Croatia"
android:layout_alignLeft="@+id/Croatia"
android:layout_alignStart="@+id/Croatia"
android:layout_marginTop="20dp"
android:id="@+id/Greece" />
<TextView
android:id="@+id/GreeceHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"
android:text="Greece"
android:layout_alignTop="@+id/Greece"
android:layout_alignRight="@+id/CroatiaHeader"
android:layout_alignEnd="@+id/CroatiaHeader" />
<TextView
android:id="@+id/GreeceLocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="italic"
android:textColor="@android:color/black"
android:text="Samaria gorge"
android:layout_below="@+id/GreeceHeader"
android:layout_toRightOf="@id/Greece"
android:layout_alignLeft="@+id/CroatiaLocation"
android:layout_alignStart="@+id/CroatiaLocation" />
<TextView
android:id="@+id/GreeceAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Samaria Gorge, Sfakia 730 11, Greece"
android:textColor="@android:color/black"
android:layout_below="@+id/GreeceLocation"
android:layout_alignLeft="@+id/IranLocation"
android:layout_alignStart="@+id/IranLocation" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email: htour@somethingmail.co.uk"
android:layout_below="@+id/Greece"
android:textColor="@android:color/black"
android:textSize="20dp"
android:layout_alignLeft="@+id/Greece"
android:layout_alignStart="@+id/Greece"
android:layout_marginTop="15dp"
android:id="@+id/textView" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="22sp"
android:textColor="@color/colorPrimaryDark"
android:fontFamily="sans-serif"
android:paddingLeft="10dp"
android:paddingBottom="10dp"
android:id="@+id/littleheader"
android:text="Highly recommend locations:"
android:layout_below="@+id/header"
android:layout_alignRight="@+id/textView"
android:layout_alignEnd="@+id/textView" />
</RelativeLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

View File

@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Udacity Project_H Mal</string>
</resources>

View File

@@ -0,0 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

View File

@@ -0,0 +1,17 @@
package com.example.h_mal.udacityproject_hmal;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}