This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by tonyjs on 16. 5. 9.. | |
*/ | |
public class DynamicImageViewTarget extends GlideDrawableImageViewTarget { | |
public static final String TAG = DynamicImageViewTarget.class.getSimpleName(); | |
private ImageView.ScaleType placeHolderScaleType = ImageView.ScaleType.FIT_CENTER; | |
private ImageView.ScaleType actualImageScaleType = ImageView.ScaleType.FIT_CENTER; | |
private ImageView.ScaleType errorScaleType = ImageView.ScaleType.FIT_CENTER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface LiveDataOwner { | |
fun getObservableData(): MutableLiveData<DataChangeInfo> | |
} | |
data class DataChangeInfo(val data: Any, val event: DataChangeEvent) | |
enum class DataChangeEvent { | |
NEW, UPDATE, DELETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface LiveDataOwner { | |
fun getObservableData(): MutableLiveData<DataChangeInfo> | |
} | |
data class DataChangeInfo(val data: Any, val event: DataChangeEvent) | |
enum class DataChangeEvent { | |
NEW, UPDATE, DELETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shouldShowRequestPermissionRational = false | |
for(permission in permissions) { | |
if (shouldShowRequestPermissionRationale(permission)) { | |
shouldShowRequestPermissionRational = true | |
break | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface UserComponent { | |
// Not Working | |
val facebookRepository : UserRepository | |
val googleRepository : UserRepository | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long id | |
String title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tonyjs.sample | |
import android.animation.ObjectAnimator | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.os.Build | |
import android.os.Bundle | |
import android.support.annotation.ColorRes | |
import android.support.annotation.LayoutRes | |
import android.support.annotation.StringRes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tonyjs.multiviewtypeadapter | |
import android.support.annotation.LayoutRes | |
import android.support.v7.widget.RecyclerView | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import kotlin.reflect.KClass | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tonyjs.sample.multiviewtypeadapter.kotlin | |
import kotlinx.android.synthetic.main.item_a.view.* | |
/** | |
* Created by tonyjs on 2017. 4. 2.. | |
*/ | |
class ExampleAdapter : MultiViewTypeAdapter() { | |
companion object { |