Initial commit

This commit is contained in:
RyanairRecruitment
2025-06-12 10:14:10 +02:00
committed by GitHub
commit 1656e706a0
48 changed files with 1442 additions and 0 deletions

1
app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

76
app/build.gradle.kts Normal file
View File

@ -0,0 +1,76 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("com.google.devtools.ksp")
id("com.google.dagger.hilt.android")
}
android {
namespace = "com.ryanair.androidchallenge"
compileSdk = 35
defaultConfig {
applicationId = "com.ryanair.androidchallenge"
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
minSdk = 28
targetSdk = 35
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
getByName("debug") {
isDebuggable = true
isMinifyEnabled = false
isShrinkResources = false
}
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures {
viewBinding = true
compose = true
}
}
dependencies {
val composeBom = platform("androidx.compose:compose-bom:2025.04.01")
implementation(composeBom)
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-core")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.activity:activity-compose:1.10.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.9.0")
implementation("androidx.core:core-ktx:1.16.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.0")
// Dependency Injection
implementation("com.google.dagger:hilt-android:2.56.2")
ksp("com.google.dagger:hilt-compiler:2.56.2")
// Network
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.15.2")
implementation("com.squareup.moshi:moshi:1.15.2")
implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.squareup.retrofit2:converter-moshi:2.11.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
}

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

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# 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 *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ryanair.androidchallenge">
<application
android:name=".core.App"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.DayNight">
<activity
android:name=".ui.MainActivity"
android:exported="true">
<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,7 @@
package com.ryanair.androidchallenge.core
import android.app.Application
import dagger.hilt.android.HiltAndroidApp
@HiltAndroidApp
class App : Application()

View File

@ -0,0 +1,57 @@
package com.ryanair.androidchallenge.di
import com.ryanair.androidchallenge.repository.airports.api.AirportService
import com.ryanair.androidchallenge.repository.airports.api.RoutesService
import com.ryanair.androidchallenge.repository.flights.api.FlightService
import com.squareup.moshi.Moshi
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
class NetworkModule {
@Singleton
@Provides
fun provideMoshi() = Moshi.Builder().build()
@Singleton
@Provides
fun provideHttpLoggingInterceptor() = HttpLoggingInterceptor().apply {
setLevel(HttpLoggingInterceptor.Level.BODY)
}
@Singleton
@Provides
fun providesOkHttpClient(loggingInterceptor: HttpLoggingInterceptor) =
OkHttpClient.Builder().also { builder ->
builder.addInterceptor(loggingInterceptor)
}.build()
@Singleton
@Provides
fun provideRetrofit(client: OkHttpClient, moshi: Moshi): Retrofit = Retrofit.Builder()
// TODO("add URL provided in the task instructions")
.addConverterFactory(MoshiConverterFactory.create(moshi))
.client(client)
.build()
@Singleton
@Provides
fun provideAirportService(retrofit: Retrofit): AirportService = retrofit.create(AirportService::class.java)
@Singleton
@Provides
fun provideRoutesService(retrofit: Retrofit): RoutesService = retrofit.create(RoutesService::class.java)
@Singleton
@Provides
fun provideFlightService(retrofit: Retrofit): FlightService = retrofit.create(FlightService::class.java)
}

View File

@ -0,0 +1,12 @@
package com.ryanair.androidchallenge.repository.airports.api
import com.ryanair.androidchallenge.repository.airports.model.AirportResponse
import retrofit2.http.GET
import retrofit2.http.Path
interface AirportService {
@GET("/views/locate/5/airports/{language}/active")
suspend fun getAirports(@Path("language") languageCode: String): List<AirportResponse>
}

View File

@ -0,0 +1,19 @@
package com.ryanair.androidchallenge.repository.airports.api
import com.ryanair.androidchallenge.repository.airports.model.RouteResponse
import retrofit2.http.GET
import retrofit2.http.Path
interface RoutesService {
@GET("/views/locate/5/routes/{language}")
suspend fun getAllRoutes(
@Path("language") languageCode: String,
): List<RouteResponse>
@GET("/views/locate/5/routes/{language}/airport/{departure}")
suspend fun getRoutes(
@Path("language") languageCode: String,
@Path("departure") departureAirportCode: String,
): List<RouteResponse>
}

View File

@ -0,0 +1,51 @@
package com.ryanair.androidchallenge.repository.airports.model
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class AirportResponse(
@Json(name = "code") val code: String?,
@Json(name = "name") val name: String?,
@Json(name = "seoName") val seoName: String?,
@Json(name = "base") val isBase: Boolean?,
@Json(name = "timeZone") val timeZone: String?,
@Json(name = "city") val city: City?,
@Json(name = "macCity") val macCity: MacCity?,
@Json(name = "region") val region: Region?,
@Json(name = "country") val country: Country?,
@Json(name = "coordinates") val coordinates: Coordinates?
) {
@JsonClass(generateAdapter = true)
data class City(
@Json(name = "code") val code: String?,
@Json(name = "name") val name: String?
)
@JsonClass(generateAdapter = true)
data class MacCity(
@Json(name = "code") val code: String?,
@Json(name = "macCode") val macCode: String?,
@Json(name = "name") val name: String?
)
@JsonClass(generateAdapter = true)
data class Region(
@Json(name = "code") val code: String?,
@Json(name = "name") val name: String?
)
@JsonClass(generateAdapter = true)
data class Country(
@Json(name = "code") val code: String?,
@Json(name = "name") val name: String?,
@Json(name = "currency") val currencyCode: String?
)
@JsonClass(generateAdapter = true)
data class Coordinates(
@Json(name = "latitude") val latitude: Double?,
@Json(name = "longitude") val longitude: Double?
)
}

View File

@ -0,0 +1,50 @@
package com.ryanair.androidchallenge.repository.airports.model
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class RouteResponse(
@Json(name = "departureAirport") val departureAirport: Airport.Departure?,
@Json(name = "arrivalAirport") val arrivalAirport: Airport.Arrival?,
@Json(name = "connectingAirport") val connectingAirport: Airport.Connecting?
) {
sealed interface Airport {
@Json(name = "code")
val code: String?
@Json(name = "name")
val name: String?
@Json(name = "macCity")
val macCity: MacCity?
@JsonClass(generateAdapter = true)
data class Departure(
override val code: String?,
override val name: String?,
override val macCity: MacCity?,
) : Airport
@JsonClass(generateAdapter = true)
data class Arrival(
override val code: String?,
override val name: String?,
override val macCity: MacCity?
) : Airport
@JsonClass(generateAdapter = true)
data class Connecting(
override val code: String?,
override val name: String?,
override val macCity: MacCity?
) : Airport
@JsonClass(generateAdapter = true)
data class MacCity(
@Json(name = "macCode") val macCode: String?
)
}
}

View File

@ -0,0 +1,26 @@
package com.ryanair.androidchallenge.repository.flights.api
import com.ryanair.androidchallenge.repository.flights.model.FlightResponse
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.Query
interface FlightService {
// example query: v4/en-gb/Availability?dateout=2025-09-17&origin=WRO&destination=DUB&adt=1&ToUs=AGREED
@Headers(
"client: android",
"client-version: 3.300.0"
)
@GET("v4/en-gb/Availability")
suspend fun getFlights(
@Query("dateout") date: String,
@Query("origin") origin: String,
@Query("destination") destination: String,
@Query("adt") adult: Int,
@Query("teen") teen: Int,
@Query("chd") child: Int,
@Query("inf") inf: Int = 0,
@Query("ToUs") toUs: String = "AGREED"
): FlightResponse
}

View File

@ -0,0 +1,56 @@
package com.ryanair.androidchallenge.repository.flights.model
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class FlightResponse(
@Json(name = "currency") val currency: String?,
@Json(name = "currPrecision") val currPrecision: Int?,
@Json(name = "trips") val trips: List<Trip>?
)
@JsonClass(generateAdapter = true)
data class Trip(
@Json(name = "dates") val dates: List<TripDate>?,
@Json(name = "origin") val origin: String?,
@Json(name = "destination") val destination: String?
)
@JsonClass(generateAdapter = true)
data class TripDate(
@Json(name = "dateOut") val dateOut: String?,
@Json(name = "flights") val flights: List<TripFlight>?
)
@JsonClass(generateAdapter = true)
data class TripFlight(
@Json(name = "faresLeft") val faresLeft: Int?,
@Json(name = "regularFare") val regularFare: RegularFare?,
@Json(name = "flightNumber") val flightNumber: String?,
@Json(name = "time") val dateTimes: List<String>?,
@Json(name = "duration") val duration: String?,
@Json(name = "segments") val segments: List<Segment>?,
@Json(name = "operatedBy") val operatedBy: String?,
)
@JsonClass(generateAdapter = true)
data class RegularFare(
@Json(name = "fares") val fares: List<TripFare>?
)
@JsonClass(generateAdapter = true)
data class TripFare(
@Json(name = "type") val type: String?,
@Json(name = "amount") val amount: Double?,
@Json(name = "count") val count: Int?
)
@JsonClass(generateAdapter = true)
data class Segment(
@Json(name = "origin") val origin: String?,
@Json(name = "destination") val destination: String?,
@Json(name = "flightNumber") val flightNumber: String?,
@Json(name = "time") val dateTimes: List<String>?,
@Json(name = "duration") val duration: String?
)

View File

@ -0,0 +1,21 @@
package com.ryanair.androidchallenge.ui
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.ryanair.androidchallenge.ui.search.SearchScreen
import com.ryanair.androidchallenge.ui.theme.AndroidChallengeTheme
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
AndroidChallengeTheme {
SearchScreen()
}
}
}
}

View File

@ -0,0 +1,118 @@
package com.ryanair.androidchallenge.ui.search
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Search
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.ryanair.androidchallenge.ui.theme.Theme
@Composable
internal fun SearchScreen() {
Column(
modifier = Modifier
.padding(Theme.spacing.spacing16)
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.SpaceBetween
) {
Column(
modifier = Modifier
.wrapContentHeight()
.fillMaxWidth()
) {
Card(
modifier = Modifier
.fillMaxWidth()
.clickable { },
border = BorderStroke(Theme.spacing.spacing1, Theme.colors.primary),
colors = CardDefaults.cardColors().copy(containerColor = Theme.colors.background)
) {
Box(modifier = Modifier.padding(Theme.spacing.spacing8)) {
Column {
Text(text = "From")
Text(text = "", maxLines = 3)
}
}
}
Spacer(modifier = Modifier.height(Theme.spacing.spacing16))
Card(
modifier = Modifier
.fillMaxWidth()
.clickable { },
border = BorderStroke(Theme.spacing.spacing1, Theme.colors.primary),
colors = CardDefaults.cardColors().copy(containerColor = Theme.colors.background)
) {
Box(modifier = Modifier.padding(Theme.spacing.spacing8)) {
Column {
Text(text = "To")
Text(text = "", maxLines = 3)
}
}
}
Spacer(modifier = Modifier.height(Theme.spacing.spacing16))
Card(
modifier = Modifier
.fillMaxWidth()
.clickable { },
border = BorderStroke(Theme.spacing.spacing1, Theme.colors.primary),
colors = CardDefaults.cardColors().copy(containerColor = Theme.colors.background)
) {
Box(modifier = Modifier.padding(Theme.spacing.spacing8)) {
Column {
Text(text = "Departure date")
Text(text = "", maxLines = 3)
}
}
}
Spacer(modifier = Modifier.height(Theme.spacing.spacing16))
Card(
modifier = Modifier
.fillMaxWidth()
.clickable { },
border = BorderStroke(Theme.spacing.spacing1, Theme.colors.primary),
colors = CardDefaults.cardColors().copy(containerColor = Theme.colors.background)
) {
Box(modifier = Modifier.padding(Theme.spacing.spacing8)) {
Column {
Text(text = "Passengers")
Text(text = "", maxLines = 3)
}
}
}
}
Button(modifier = Modifier
.fillMaxWidth(),
enabled = false,
onClick = { /*TODO*/ }) {
Row {
Icon(
imageVector = Icons.Rounded.Search,
contentDescription = ""
)
Text(text = "Search")
}
}
}
}

View File

@ -0,0 +1,23 @@
package com.ryanair.androidchallenge.ui.theme
import androidx.compose.runtime.Stable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.graphics.Color
object Palette {
val Purple80 = Color(0xFFD0BCFF)
val Purple40 = Color(0xFF6650a4)
val White = Color(0xFFFFFFFF)
}
@Stable
data class ColorScheme(
val primary: Color = Palette.Purple80,
val primaryAccent: Color = Palette.Purple40,
val background: Color = Palette.White,
)
val LocalColorScheme = staticCompositionLocalOf { ColorScheme() }

View File

@ -0,0 +1,37 @@
package com.ryanair.androidchallenge.ui.theme
import androidx.compose.runtime.Stable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
@Stable
data class Spacing(
val spacing0: Dp = 0.dp,
val spacing1: Dp = 1.dp,
val spacing2: Dp = 2.dp,
val spacing4: Dp = 4.dp,
val spacing6: Dp = 6.dp,
val spacing8: Dp = 8.dp,
val spacing10: Dp = 10.dp,
val spacing12: Dp = 12.dp,
val spacing14: Dp = 14.dp,
val spacing16: Dp = 16.dp,
val spacing18: Dp = 18.dp,
val spacing20: Dp = 20.dp,
val spacing22: Dp = 22.dp,
val spacing24: Dp = 24.dp,
val spacing26: Dp = 26.dp,
val spacing28: Dp = 28.dp,
val spacing30: Dp = 30.dp,
val spacing32: Dp = 32.dp,
val spacing36: Dp = 36.dp,
val spacing38: Dp = 38.dp,
val spacing40: Dp = 40.dp,
val spacing42: Dp = 42.dp,
val spacing48: Dp = 48.dp,
val spacing56: Dp = 56.dp,
val spacing66: Dp = 66.dp,
)
val LocalSpacing = staticCompositionLocalOf { Spacing() }

View File

@ -0,0 +1,38 @@
package com.ryanair.androidchallenge.ui.theme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.ReadOnlyComposable
@Composable
fun AndroidChallengeTheme(
colorScheme: ColorScheme = Theme.colors,
typography: Typography = Theme.typography,
spacing: Spacing = Theme.spacing,
content: @Composable () -> Unit
) {
CompositionLocalProvider(
LocalColorScheme provides colorScheme,
LocalTypography provides typography,
LocalSpacing provides spacing
) {
content()
}
}
object Theme {
val colors: ColorScheme
@Composable
@ReadOnlyComposable
get() = LocalColorScheme.current
val typography: Typography
@Composable
@ReadOnlyComposable
get() = LocalTypography.current
val spacing: Spacing
@Composable
@ReadOnlyComposable
get() = LocalSpacing.current
}

View File

@ -0,0 +1,51 @@
package com.ryanair.androidchallenge.ui.theme
import androidx.compose.runtime.Stable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
@Stable
data class Typography(
val titleSmall: TextStyle = TextStyle(
fontFamily = FontFamily.Default,
fontSize = 14.sp,
fontWeight = FontWeight.Bold,
lineHeight = 20.sp,
),
val titleLarge: TextStyle = TextStyle(
fontFamily = FontFamily.Default,
fontSize = 18.sp,
fontWeight = FontWeight.Bold,
lineHeight = 20.sp,
),
val subtitleSmall: TextStyle = TextStyle(
fontFamily = FontFamily.Default,
fontSize = 12.sp,
fontWeight = FontWeight.Bold,
lineHeight = 16.sp,
),
val subtitleLarge: TextStyle = TextStyle(
fontFamily = FontFamily.Default,
fontSize = 16.sp,
fontWeight = FontWeight.Bold,
lineHeight = 20.sp,
),
val bodySmall: TextStyle = TextStyle(
fontFamily = FontFamily.Default,
fontSize = 10.sp,
fontWeight = FontWeight.Normal,
lineHeight = 12.sp,
),
val bodyLarge: TextStyle = TextStyle(
fontFamily = FontFamily.Default,
fontSize = 14.sp,
fontWeight = FontWeight.Normal,
lineHeight = 20.sp,
)
)
val LocalTypography = staticCompositionLocalOf { Typography() }

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:textColorPrimary">
<path
android:fillColor="@android:color/white"
android:pathData="M2.5,19h19v2h-19V19zM19.34,15.85c0.8,0.21 1.62,-0.26 1.84,-1.06c0.21,-0.8 -0.26,-1.62 -1.06,-1.84l-5.31,-1.42l-2.76,-9.02L10.12,2v8.28L5.15,8.95L4.22,6.63L2.77,6.24v5.17L19.34,15.85z" />
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:textColorPrimary">
<path
android:fillColor="@android:color/white"
android:pathData="M2.5,19h19v2h-19V19zM22.07,9.64c-0.21,-0.8 -1.04,-1.28 -1.84,-1.06L14.92,10l-6.9,-6.43L6.09,4.08l4.14,7.17l-4.97,1.33l-1.97,-1.54l-1.45,0.39l2.59,4.49c0,0 7.12,-1.9 16.57,-4.43C21.81,11.26 22.28,10.44 22.07,9.64z" />
</vector>

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#1f60f5</color>
<color name="colorPrimaryVariant">#0037c1</color>
<color name="colorPrimaryVariant3">#1A6F8DFF</color>
<color name="colorOnPrimary">@color/white</color>
<color name="colorSecondary">#f1c931</color>
<color name="colorSecondaryVariant">#ba9900</color>
<color name="colorOnSecondary">@color/black</color>
<color name="black">#ff000000</color>
<color name="white">#ffffffff</color>
</resources>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="match_constraints">0dp</dimen>
<dimen name="size_tinyish">2dp</dimen>
<dimen name="size_tiny">4dp</dimen>
<dimen name="size_tiny_plus">6dp</dimen>
<dimen name="size_small">8dp</dimen>
<dimen name="size_small_plus">10dp</dimen>
<dimen name="size_medium">12dp</dimen>
<dimen name="size_general">16dp</dimen>
<dimen name="size_general_plus">18dp</dimen>
<dimen name="size_extra_large">20dp</dimen>
<dimen name="size_extra_large_plus">26dp</dimen>
<dimen name="size_general_double">32dp</dimen>
<dimen name="size_general_plus_double">36dp</dimen>
<dimen name="size_double_extra_large">42dp</dimen>
<dimen name="size_general_double_double">64dp</dimen>
</resources>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<plurals name="adult">
<item quantity="one">%d Adult</item>
<item quantity="other">%d Adults</item>
</plurals>
<plurals name="teen">
<item quantity="one">%d Teen</item>
<item quantity="other">%d Teens</item>
</plurals>
<plurals name="child">
<item quantity="one">%d Child</item>
<item quantity="other">%d Children</item>
</plurals>
<plurals name="stop">
<item quantity="one">%d Stop</item>
<item quantity="other">%d Stops</item>
</plurals>
</resources>

View File

@ -0,0 +1,32 @@
<resources>
<string name="app_name">AndroidChallenge</string>
<string name="from">From</string>
<string name="to">To</string>
<string name="departure_date">Departure date</string>
<string name="passengers">Passengers</string>
<string name="search">Search</string>
<string name="select_departure_airport_first">You need to select departure airport first</string>
<string name="select_departure_date">Select departure date</string>
<string name="adult">Adult</string>
<string name="teen">Teen</string>
<string name="child">Child</string>
<string name="cancel">Cancel</string>
<string name="submit">Submit</string>
<string name="server_error">Unable to connect to server</string>
<string name="no_internet_connection">No internet connection</string>
<string name="fill_all_data_first">You need to fill all data first.</string>
<string name="flight_not_found">Unfortunately there is no flight on particular date.\nChoose different one.</string>
<string name="go_back">Go back</string>
<string name="total_price">Total price:</string>
<string name="price_adult">Adult: %d x %.2f %s</string>
<string name="price_teen">Teen: %d x %.2f %s</string>
<string name="price_child">Child: %d x %.2f %s</string>
<string name="search_airport">Search airport</string>
<string name="find_airport">Find airport</string>
<string name="flights">Flights</string>
<string name="search_origin_airport">Search origin airport</string>
<string name="search_destination_airport">Search destination airport</string>
<string name="flight_details">Flight details</string>
<string name="price_range">Price range:</string>
<string name="no_filter_results">There are no flights in selected price range</string>
</resources>