Skip to content

Commit 15990b8

Browse files
committed
Initial commit
1 parent b93ff2b commit 15990b8

31 files changed

+677
-0
lines changed

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'kotlin-android'
4+
5+
apply plugin: 'kotlin-android-extensions'
6+
7+
apply plugin: 'kotlin-kapt'
8+
9+
android {
10+
compileSdkVersion 28
11+
defaultConfig {
12+
applicationId "cz.hlinkapp.flidea"
13+
minSdkVersion 21
14+
targetSdkVersion 28
15+
versionCode 1
16+
versionName "1.0.0-alpha"
17+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
}
26+
27+
dependencies {
28+
implementation fileTree(dir: 'libs', include: ['*.jar'])
29+
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
30+
implementation 'androidx.appcompat:appcompat:1.1.0'
31+
implementation 'androidx.core:core-ktx:1.2.0-alpha04'
32+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
33+
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'
34+
testImplementation 'junit:junit:4.12'
35+
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
36+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
37+
38+
//BackdropLayout
39+
implementation 'io.github.rokarpov:backdrop:0.3'
40+
41+
//Material
42+
implementation 'com.google.android.material:material:1.0.0'
43+
44+
//Android Lifecycle
45+
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-alpha04'
46+
47+
//Retrofit
48+
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
49+
50+
//Retrofit GSON
51+
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
52+
53+
//Glide
54+
implementation 'com.github.bumptech.glide:glide:4.9.0'
55+
kapt 'com.github.bumptech.glide:compiler:4.9.0'
56+
57+
//Dagger2
58+
implementation 'com.google.dagger:dagger:2.15'
59+
kapt 'com.google.dagger:dagger-compiler:2.15'
60+
implementation 'com.google.dagger:dagger-android:2.15'
61+
implementation 'com.google.dagger:dagger-android-support:2.15'
62+
kapt 'com.google.dagger:dagger-android-processor:2.15'
63+
64+
//Room
65+
implementation "androidx.room:room-runtime:2.2.0-rc01"
66+
kapt "androidx.room:room-compiler:2.2.0-rc01"
67+
68+
//Android KTX
69+
implementation 'androidx.core:core-ktx:1.1.0'
70+
implementation 'androidx.fragment:fragment-ktx:1.1.0'
71+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

app/src/main/AndroidManifest.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="cz.hlinkapp.flidea">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
12+
<activity android:name=".activities.MainActivity">
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN"/>
15+
16+
<category android:name="android.intent.category.LAUNCHER"/>
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package cz.hlinkapp.flidea.activities
2+
3+
import android.os.Bundle
4+
import androidx.appcompat.app.AppCompatActivity
5+
import cz.hlinkapp.flidea.R
6+
import io.github.rokarpov.backdrop.BackdropController
7+
import kotlinx.android.synthetic.main.activity_main.*
8+
9+
class MainActivity : AppCompatActivity() {
10+
11+
private var backdropController: BackdropController? = null
12+
13+
override fun onCreate(savedInstanceState: Bundle?) {
14+
super.onCreate(savedInstanceState)
15+
setContentView(R.layout.activity_main)
16+
17+
setSupportActionBar(toolbar)
18+
toolbar.title = getString(R.string.app_name)
19+
val tl = toolbar
20+
21+
val backLayer = backdropBackLayer
22+
backdropController = BackdropController.build(backLayer, applicationContext) {
23+
supportToolbar = tl
24+
concealedTitleId = R.string.app_name
25+
concealedNavigationIconId = R.drawable.ic_menu
26+
revealedNavigationIconId = R.drawable.ic_close
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="108dp"
4+
android:height="108dp"
5+
android:viewportHeight="108"
6+
android:viewportWidth="108">
7+
<path
8+
android:fillType="evenOdd"
9+
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
10+
android:strokeColor="#00000000"
11+
android:strokeWidth="1">
12+
<aapt:attr name="android:fillColor">
13+
<gradient
14+
android:endX="78.5885"
15+
android:endY="90.9159"
16+
android:startX="48.7653"
17+
android:startY="61.0927"
18+
android:type="linear">
19+
<item
20+
android:color="#44000000"
21+
android:offset="0.0"/>
22+
<item
23+
android:color="#00000000"
24+
android:offset="1.0"/>
25+
</gradient>
26+
</aapt:attr>
27+
</path>
28+
<path
29+
android:fillColor="#FFFFFF"
30+
android:fillType="nonZero"
31+
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
32+
android:strokeColor="#00000000"
33+
android:strokeWidth="1"/>
34+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item>
5+
<shape android:shape="rectangle">
6+
<solid android:color="@color/colorWhite"/>
7+
<corners android:topLeftRadius="15dp"
8+
android:topRightRadius="15dp"/>
9+
</shape>
10+
</item>
11+
12+
</selector>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:height="108dp"
5+
android:width="108dp"
6+
android:viewportHeight="108"
7+
android:viewportWidth="108">
8+
<path android:fillColor="#008577"
9+
android:pathData="M0,0h108v108h-108z"/>
10+
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
11+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
12+
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
13+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
14+
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
15+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
16+
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
17+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
18+
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
19+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
20+
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
21+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
22+
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
23+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
24+
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
25+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
26+
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
27+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
28+
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
29+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
30+
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
31+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
32+
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
33+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
34+
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
35+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
36+
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
37+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
38+
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
39+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
40+
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
41+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
42+
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
43+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
44+
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
45+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
46+
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
47+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
48+
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
49+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
50+
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
51+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
52+
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
53+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
54+
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
55+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
56+
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
57+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
58+
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
59+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
60+
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
61+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
62+
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
63+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
64+
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
65+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
66+
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
67+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
68+
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
69+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
70+
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
71+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
72+
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
73+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
74+
</vector>

app/src/main/res/drawable/ic_menu.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
9+
</vector>
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:id="@+id/coordinatorLayout"
7+
android:background="@color/colorPrimary"
8+
android:layout_width="match_parent"
9+
android:layout_height="match_parent">
10+
11+
<io.github.rokarpov.backdrop.BackdropBackLayer
12+
tools:context=".activities.MainActivity"
13+
android:id="@+id/backdropBackLayer"
14+
android:layout_width="match_parent"
15+
android:layout_height="wrap_content">
16+
17+
<androidx.appcompat.widget.Toolbar
18+
android:id="@+id/toolbar"
19+
android:layout_width="match_parent"
20+
android:layout_height="?attr/actionBarSize"
21+
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
22+
app:layout_childType="header"/>
23+
24+
<!--<io.github.rokarpov.backdrop.demo.SearchBackView
25+
android:id="@+id/main__search_view"
26+
android:layout_width="match_parent"
27+
android:layout_height="match_parent"
28+
app:layout_childType="content"
29+
app:layout_hideHeaderOnReveal="true"
30+
app:layout_minRevealedFrontViewHeight="@dimen/subheader_height"/>-->
31+
</io.github.rokarpov.backdrop.BackdropBackLayer>
32+
33+
<io.github.rokarpov.backdrop.BackdropFrontLayer
34+
android:id="@+id/backdropFrontLayer"
35+
android:background="@drawable/bg_backdrop_front_layer"
36+
android:layout_width="match_parent"
37+
android:layout_height="match_parent"
38+
app:layout_behavior="@string/backdrop_front_layer_behavior"
39+
android:paddingStart="16dp"
40+
android:paddingEnd="16dp">
41+
42+
<androidx.constraintlayout.widget.ConstraintLayout
43+
android:layout_width="match_parent"
44+
android:layout_height="@dimen/subheader_height"
45+
app:layout_childType="header">
46+
47+
<TextView
48+
android:layout_width="wrap_content"
49+
android:layout_height="wrap_content"
50+
android:layout_marginStart="8dp"
51+
android:text="@string/app_name"
52+
app:layout_constraintBottom_toBottomOf="parent"
53+
app:layout_constraintStart_toStartOf="parent"
54+
app:layout_constraintTop_toTopOf="parent" />
55+
56+
</androidx.constraintlayout.widget.ConstraintLayout>
57+
</io.github.rokarpov.backdrop.BackdropFrontLayer>
58+
59+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>
2.89 KB
Loading
Loading
2.01 KB
Loading
Loading
4.38 KB
Loading
Loading
6.24 KB
Loading
Loading
8.91 KB
Loading
Loading

app/src/main/res/values/colors.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#008577</color>
4+
<color name="colorPrimaryDark">#00574B</color>
5+
<color name="colorAccent">#D81B60</color>
6+
<color name="colorWhite">#FFFFFF</color>
7+
</resources>

app/src/main/res/values/strings.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">Flidea</string>
3+
</resources>

app/src/main/res/values/styles.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
9+
</style>
10+
11+
</resources>

0 commit comments

Comments
 (0)