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
| package com.androidtool.common.base.event | |
| import android.app.Activity | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import android.widget.RemoteViews | |
| import androidx.fragment.app.Fragment | |
| import androidx.lifecycle.DefaultLifecycleObserver | |
| import androidx.lifecycle.Lifecycle | |
| import androidx.lifecycle.LifecycleEventObserver |
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
| object Job { | |
| fun start() { | |
| } | |
| fun cancel() { | |
| } | |
| } |
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
| object Job { | |
| fun start() { | |
| } | |
| fun cancel() { | |
| } | |
| } |
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 java.awt.Component | |
| //公司框架结构 | |
| abstract class Component(name: String) { | |
| //展示 | |
| abstract fun show(depth: Int) | |
| } | |
| //这里可以表示具体公司框架(公司、部门) | |
| class Composite(val name: String) : Component(name) { |
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 java.util.function.Consumer | |
| abstract class Colleague { | |
| //中介者抽象类 | |
| protected var mediator: Mediator? = null | |
| //接受消息 | |
| abstract fun receive() | |
| //发送消息 |
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 UserHelper { | |
| fun login() { | |
| println("login") | |
| } | |
| fun logout() { | |
| println("logout") | |
| } | |
| } |
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
| package com.aqua30.learningproject | |
| import android.content.Context | |
| import android.util.AttributeSet | |
| import android.util.Log | |
| import android.view.View | |
| import android.view.View.MeasureSpec | |
| import androidx.viewpager.widget.ViewPager | |
| class AdjustingViewPager: ViewPager { |
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
| ```java | |
| import android.content.Context; | |
| import android.database.ContentObserver; | |
| import android.database.Cursor; | |
| import android.graphics.Point; | |
| import android.net.Uri; | |
| import android.os.Handler; | |
| import android.os.Looper; | |
| import android.provider.MediaStore; | |
| import android.text.TextUtils; |
NewerOlder