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
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.util.AttributeSet | |
import android.view.View | |
private const val N = 16 | |
private const val PERIOD1 = -10000.0 | |
private const val PERIOD2 = -500.0 |
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 example | |
import android.support.v7.recyclerview.extensions.AsyncDifferConfig | |
import android.support.v7.recyclerview.extensions.AsyncListDiffer | |
import android.support.v7.util.DiffUtil | |
import android.support.v7.util.ListUpdateCallback | |
import android.support.v7.widget.RecyclerView | |
/** | |
* {@link RecyclerView.Adapter RecyclerView.Adapter} base class based on |
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
/** | |
* An [Observer] for [Event]s, simplifying the pattern of checking if the [Event]'s content has | |
* already been handled. | |
* | |
* [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled. | |
*/ | |
class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> { | |
override fun onChanged(event: Event<T>?) { | |
event?.getContentIfNotHandled()?.let { value -> | |
onEventUnhandledContent(value) |
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
<templateSet group="ConstraintLayout"> | |
<template name="cbb" value="app:layout_constraintBottom_toBottomOf="$cursor$"" description="constraint bottom to bottom of id" toReformat="true" toShortenFQNames="true"> | |
<variable name="cursor" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="XML" value="true" /> | |
<option name="XML_TEXT" value="false" /> | |
</context> | |
</template> | |
<template name="cbp" value="app:layout_constraintBottom_toBottomOf="parent"" description="constraint bottom to bottom of parent" toReformat="true" toShortenFQNames="true"> | |
<context> |
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
/* | |
* Copyright (C) 2016 Jeff Gilfelt. | |
* | |
* 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 |
이 문서가 여기저기 알려짐에 따라, 이곳에 여러가지 댓글이 달리고 있습니다. 개인적으로는 댓글창을 없애버리고 싶지만 그럴 수 없는 터라, 댓글을 달기 전에 한번씩만 더 생각해주셨으면 합니다.
- 개인적인 감상은 이곳이 아닌 다른 곳에 적어주세요.
- 동성애 혐오적인 댓글을 달지 마세요.
- 기타 "난해한 혀엉... 언어"와 관련없는 댓글을 달지 말아주세요.
위 사항들을 포함해 제 마음에 안 드는 댓글들은 임의로 삭제하고 있습니다. 양해 부탁드립니다.
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
public class MainActivity extends AppCompatActivity { | |
public static class Shop { | |
public int id; | |
public String name; | |
public List<Coordinate> coordinates = new ArrayList<>(); | |
@Override | |
public String toString() { | |
String str = id + " (" + name + ") [ "; |
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 productmeister.com.productmeister.view; | |
import android.annotation.TargetApi; | |
import android.os.Build; | |
import android.support.design.widget.AppBarLayout; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v7.app.ActionBar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; |
NewerOlder