Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LifeLogger
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
LifeLogger
Commits
98d7876b
Unverified
Commit
98d7876b
authored
Feb 17, 2019
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Add anko
parent
b9fd5509
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
build.gradle
app/build.gradle
+6
-0
HomeActivity.kt
app/src/main/java/fr/plnech/lifelogger/ui/HomeActivity.kt
+2
-3
No files found.
app/build.gradle
View file @
98d7876b
...
...
@@ -42,6 +42,7 @@ android {
ext
{
roomVersion
=
'1.1.1'
archLifecycleVersion
=
'1.1.1'
ankoVersion
=
'0.10.8'
}
dependencies
{
...
...
@@ -73,7 +74,12 @@ dependencies {
// Paging
implementation
"androidx.paging:paging-runtime:2.1.0"
// KTX
implementation
'androidx.core:core-ktx:1.1.0-alpha04'
// Anko
implementation
"org.jetbrains.anko:anko-commons:$ankoVersion"
implementation
"org.jetbrains.anko:anko-design:$ankoVersion"
// For SnackBars
// endregion
// region Tests
...
...
app/src/main/java/fr/plnech/lifelogger/ui/HomeActivity.kt
View file @
98d7876b
...
...
@@ -18,7 +18,6 @@
package
fr.plnech.lifelogger.ui
import
android.os.Bundle
import
com.google.android.material.snackbar.Snackbar
import
androidx.appcompat.app.AppCompatActivity
import
android.view.Menu
import
android.view.MenuItem
...
...
@@ -28,6 +27,7 @@ import fr.plnech.lifelogger.model.Log
import
fr.plnech.lifelogger.model.LogAdapter
import
kotlinx.android.synthetic.main.activity_home.*
import
kotlinx.android.synthetic.main.content_home.*
import
org.jetbrains.anko.design.snackbar
class
HomeActivity
:
AppCompatActivity
()
{
...
...
@@ -40,8 +40,7 @@ class HomeActivity : AppCompatActivity() {
setSupportActionBar
(
toolbar
)
fab
.
setOnClickListener
{
view
->
Snackbar
.
make
(
view
,
"Replace with your own action"
,
Snackbar
.
LENGTH_LONG
)
.
setAction
(
"Action"
,
null
).
show
()
view
.
snackbar
(
"Replace with your own action"
,
"Action"
)
{}
}
adapter
=
LogAdapter
(
this
,
generateDebugData
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment