- basic build.gradle directory using flatDir
repositories {
mavenCentral()
flatDir {
dirs 'libs'| public abstract class AppBarStateChangedListener implements AppBarLayout.OnOffsetChangedListener { | |
| public enum State { | |
| EXPANDED, | |
| COLLAPSED, | |
| IDLE | |
| } | |
| private State mCurrentState = State.IDLE; |
| package tech.jesselima.statistics.extensions | |
| import android.animation.ObjectAnimator | |
| import android.view.View | |
| import android.view.animation.AnimationUtils | |
| import tech.jesselima.commonextensions.R | |
| fun View.showWithAnimatedFadeIn( | |
| translationType: TranslationType = TranslationType.TRANSLATION_Y, |
| private val apiModule = module { | |
| // By default, Gson is strict and only accepts JSON as specified by RFC 4627 . | |
| // This option makes the parser liberal in what it accepts | |
| single { GsonBuilder().setLenient().create() } | |
| single { | |
| // val httpLoggingInterceptor = HttpLoggingInterceptor() | |
| // httpLoggingInterceptor.level = HttpLoggingInterceptor.Level.NONE | |
| val okHttpClient = OkHttpClient() |
| public class MainActivity extends Activity { | |
| private final MyActivityLifecycleCallbacks mCallbacks = new MyActivityLifecycleCallbacks(); | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| // Always register before calling into the super class. | |
| getApplication().registerActivityLifecycleCallbacks(mCallbacks); | |
| super.onCreate(savedInstanceState); |
| public class MainActivity extends Activity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| // Always register before calling into the super class. | |
| getApplication().registerActivityLifecycleCallbacks(new MyActivityLifecycleCallbacks(this)); | |
| super.onCreate(savedInstanceState); | |
| } |
| /* | |
| * Copyright (C) 2017 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
People
:bowtie: |
๐ :smile: |
๐ :laughing: |
|---|---|---|
๐ :blush: |
๐ :smiley: |
:relaxed: |
๐ :smirk: |
๐ :heart_eyes: |
๐ :kissing_heart: |
๐ :kissing_closed_eyes: |
๐ณ :flushed: |
๐ :relieved: |
๐ :satisfied: |
๐ :grin: |
๐ :wink: |
๐ :stuck_out_tongue_winking_eye: |
๐ :stuck_out_tongue_closed_eyes: |
๐ :grinning: |
๐ :kissing: |
๐ :kissing_smiling_eyes: |
๐ :stuck_out_tongue: |
Centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.
A very good way is to separate gradle build files, defining something like:
root
--gradleScript
----dependencies.gradle