This file contains hidden or 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
{ | |
"title": "Dance - Smith Quartet", | |
"image": "https://demo.com/624.jpg", | |
"action": { | |
"type": "ComponentScreen", | |
"url": "/query/view/album/635212023624" | |
} | |
} |
This file contains hidden or 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
{ | |
"type": "componentScreen", | |
"title": "Home", | |
"sections": [ | |
{ | |
"title": "New Releases", | |
"type": "album", | |
"items": [ | |
{ | |
"title": "Dance - Smith Quartet", |
This file contains hidden or 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
[ | |
{ | |
"id": 0362403, | |
"title": "Dance - Smith Quartet", | |
"image": "https://demo.com/03624.jpg" | |
}, | |
{ | |
"id": 06083706, | |
"title": "Sixteen Contemporary Love Songs for Piano", | |
"image": "https://demo.com/060837.jpg" |
This file contains hidden or 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 Toolbar extends ViewGroup { | |
public Toolbar(Context context, @Nullable AttributeSet attrs) { | |
this(context, attrs, getToolbarStyle()); | |
} | |
private static int getToolbarStyle() { | |
return (BuildConfig.VERSION_CODE >= Build.VERSION_CODES.O) ? R.attr.newCompatToolbarStyle : R.attr.toolbarStyle; | |
} | |
} |
This file contains hidden or 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 Toolbar extends ViewGroup { | |
public Toolbar(Context context, @Nullable AttributeSet attrs) { | |
this(context, attrs, R.attr.toolbarStyle); | |
} | |
} |
This file contains hidden or 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
class MyCustomView @JvmOverloads constructor( | |
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | |
) : View(context, attrs, defStyleAttr) |
This file contains hidden or 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
class MyCustomView : View { | |
constructor(context: Context) : super(context) | |
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) | |
constructor(context: Context, attrs: AttributeSet?, attributeSetId: Int) : super(context, attrs, attributeSetId) | |
} |
This file contains hidden or 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
class MainApplication : Application() { | |
private val createdActivities = mutableListOf<WeakReference<Activity>>() | |
override fun onCreate() { | |
super.onCreate() | |
registerActivityLifecycleCallbacks(activityLifecycleCallbacks()) | |
} | |
fun closeAllActivities() { |
This file contains hidden or 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.arch.lifecycle.Lifecycle | |
import android.arch.lifecycle.LifecycleObserver | |
import android.arch.lifecycle.LifecycleOwner | |
import android.arch.lifecycle.OnLifecycleEvent | |
import com.jakewharton.rxrelay.BehaviorRelay | |
import rx.Observable | |
import rx.android.schedulers.AndroidSchedulers | |
import rx.functions.Action1 | |
import rx.subscriptions.CompositeSubscription |
This file contains hidden or 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
<component name="InspectionProjectProfileManager"> | |
<profile version="1.0"> | |
<option name="myName" value="Project Default" /> | |
<inspection_tool class="AndroidLintDrawAllocation" enabled="true" level="ERROR" enabled_by_default="true" /> | |
<inspection_tool class="SSBasedInspection" enabled="true" level="ERROR" enabled_by_default="true"> | |
<replaceConfiguration name="Escape apostrophes in Android string XMLs" text="<string $attributes$>$text$</string>" recursive="false" caseInsensitive="true" type="XML" reformatAccordingToStyle="true" shortenFQN="true" useStaticImport="true" replacement="<string $attributes$>$fixedText$</string>"> | |
<constraint name="attributes" minCount="0" maxCount="2147483647" within="" contains="" /> | |
<constraint name="text" regexp=".*[^\\]'.*" maxCount="2147483647" within="" contains="" /> | |
<variableDefinition name="fixedText" script=""text.getValue().replaceAll( "\\\\'|\'", "\\\\'" )"" /> | |
</replace |