KunMinX

KunMinX

大物始于小 - Big Things Have Small Beginnings.

Member Since 3 years ago

Hangzhou, China

Experience Points
1.3k
follower
Lessons Completed
16
follow
Lessons Completed
397
stars
Best Reply Awards
14
repos

640 contributions in the last year

Pinned
⚡ 是 难得一见 的 Jetpack MVVM 最佳实践!在 以简驭繁 的代码中,对 视图控制器 乃至 标准化开发模式 形成正确、深入的理解!
⚡ 即使不用饿了么订餐,也请务必收藏好该库!🔥 一行代码即可接入,二级联动订餐列表。
⚡ 人生苦短,让脚手架为你节省时间。(目前作为《最佳实践》项目的 Dev 版来优先更新)
Activity
Jan
17
2 days ago
started
started time in 1 day ago
push

KunMinX push KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump constraintlayout from 2.1.2 to 2.1.3 (#113)

Bumps constraintlayout from 2.1.2 to 2.1.3.


updated-dependencies:

  • dependency-name: androidx.constraintlayout:constraintlayout dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit sha: 03b889abc7b46193955abd565294072cf438555e

push time in 1 day ago
pull request

KunMinX pull request KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump constraintlayout from 2.1.2 to 2.1.3

Bumps constraintlayout from 2.1.2 to 2.1.3.

Release notes

Sourced from constraintlayout's releases.

2.1.3

Point release of the constraintlayout library.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Jan
14
5 days ago
push

KunMinX push KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump material from 1.4.0 to 1.5.0 (#111)

Bumps material from 1.4.0 to 1.5.0.


updated-dependencies:

  • dependency-name: com.google.android.material:material dependency-type: direct:production update-type: version-update:semver-minor ...

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit sha: b7604fb82f050a655d21125f87355515d411c9bc

push time in 4 days ago
pull request

KunMinX pull request KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump material from 1.4.0 to 1.5.0

Bumps material from 1.4.0 to 1.5.0.

Release notes

Sourced from material's releases.

1.5.0

What's new since 1.4.0

Other highlights

  • Badging
    • Added support for differing offsets for badges with/without text, and support for badge width and padding in styles. (bd4914dd8bcdb64c4ec8734c95b90cec2a3d723d)
  • BottomAppBar
    • Added attr to set the color of navigation icon. (0ed7c7675e42cbe417fb947f150ed9faf6a5174b)
    • Added support for showing/hiding immediately (34740b6fdf164665c438658935653d354a64d72b)
  • BottomNavigationView
    • Updated to explicitly read and set minimum height. (943c4f0eedb35850f19167ac989387f5b640af2f)
  • BottomSheet
    • Added maxHeight to bottom sheet behavior (a38d2d89a8aa22a40dd200f2d1c9e837f87669c1)
  • Chip
    • Fixed icon tint states are not updated after setting new icon (c08a07d7e8247647ea939549c1a493f1d42ac326)
  • CollapsingToolbarLayout
    • Added option to add extra height when title text spans across multiple lines (655dde062aa4e7cd4cad0137f4e975c6ed1d2c27)
    • Added option to force always applying system window inset top regardless of layout_height (9ebf1a1387be4dfad00ad2af58ef9f02ec204d10)
    • Fixed multiline RTL collapsed title text position (af35dfb86bebdbd913e74df7cb828a0218b7889a)
    • Added support for expanded and collapsed title text color attributes (5c147722edcd5e6696248a1fdd372a1385d8a7df)
    • Fixed RTL text only laying out as RTL when actual text is RTL (841f2295921b4eed8bd16bb72b28d4ef7ca7cfa5)
    • Added title line spacing and hyphenation frequency setters (f0ce498108616ee26f84d8afd26c4627a4cdcf48)
    • Added support for multiline RTL when using fade title mode (f0ac3629682b003629858ab18bf74a878f2398ac)
    • Updated default multiline hyphenation frequency to StaticLayout.HYPHENATION_FREQUENCY_NORMAL (3ad232d829b8c1192b9c1af74225a69ac1632597)
  • MaterialButton
    • Updated Material Button style to set the preferred maximum width to 320dp. (c5c7a74cef46569ee74f92d0ef973cafe06c06e9)
    • Fixed MaterialButton lollipop shape issue (153fdee2f6f9f528856130be28c74f92bf739346)
  • MaterialDatePicker
    • Avoided NPE caused by getSelection() before created (cb5d622f131323bf1f27e9e6c27c16f4a918d3d1)
    • Fixed opening at the selected date in the end month (eb7b11478b110fc917958565876899856ba2411b)
    • Fixed DatePicker crashes and and potential issue of range selection (281688a2f21263817f037d187a98b4cbc8471985)
    • Fixed excessive whitespace (8fda897e1d2670b82752e8906a2a00700557408c)
  • Snackbar
    • Handled anchor view properly so no memory leak will happen (58ceeab63ca74d740fb96fbb5e999de325822330)
    • Fixed memory leak caused by not resetting anchor views (b0558dc006ac60f1c33cff4706bef109a6f77e07)
    • Fixed maxWidth and maxInlineActionWidth are not applied (8729d8ab571bc58582147cfb01c140d2c014617c, 15e2254397996e47128d73129b305abe5b17d071)
  • TextInputLayout
    • Applied tint when setting start icons (4044183f46385d09fe0059143bda77ce78f2dad9)
    • Made clear text icon focusable (8a4f42aca737f4b0c2b7e7851e557ef275df6ebd)
    • Added a fade transition to placeholder TextView's appear and disappear. (c92e6934d53032e9a3c0b4550787e665e6494d86)
    • Fixed cutout padding so text field outline doesn't overlap collapsed hint. (87b50c6aee240659841a7d5f2e52c1a6324d611f)
  • TimePicker
    • Hid cancel button when it's not cancelable (35c2af3c2dabdc470d55b8eddff56d174cbd9763)
    • Updated accessibility event sending when updating input mode (00c0df9e7d27c093b0b8ad82934a06637247bbae)

... (truncated)

Commits
  • 4ade450 [Gradle] Replace all jcenter with mavenCentral
  • 29e594c [M3][Dialog] Fix dialog icon color tint
  • 6a914c3 [M3][Dialog] Fix dialog paddings
  • 4376067 [M3][Colors] Add additional condition to check dynamic color supported devices
  • a51c80b Update library version to 1.5.0 stable
  • 817dc12 [Color] Add additional condition to check dynamic color supported devices
  • 15e2254 [Snackbar] Fix maxWidth is not applied on Snackbar
  • 66b1c0e [M3][Colors] Add supporting brand list of dynamic colors
  • 287858a [M3][Dialog] Start-align message text with centered styles
  • 91f1f2e [M3][Card] Update M3 card elevation according to the spec
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
push

KunMinX push KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump slf4j-android from 1.7.32 to 1.7.33 (#112)

Bumps slf4j-android from 1.7.32 to 1.7.33.


updated-dependencies:

  • dependency-name: org.slf4j:slf4j-android dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit sha: b2da834ae26846acc202c61521b0f283da8765b7

push time in 4 days ago
pull request

KunMinX pull request KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump slf4j-android from 1.7.32 to 1.7.33

Bumps slf4j-android from 1.7.32 to 1.7.33.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Jan
12
1 week ago
push

KunMinX push KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump player from 3.1.0 to 3.3.0 (#109)

Bumps player from 3.1.0 to 3.3.0.


updated-dependencies:

  • dependency-name: com.kunminx.player:player dependency-type: direct:production update-type: version-update:semver-minor ...

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit sha: 4c8cc1991230ac9aedce913daca05120592eff0c

push time in 6 days ago
pull request

KunMinX pull request KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump player from 3.1.0 to 3.3.0

Bumps player from 3.1.0 to 3.3.0.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Jan
10
1 week ago
push

KunMinX push KunMinX/Jetpack-MusicPlayer

KunMinX
KunMinX

add available path custom judge interface

commit sha: 52a62e8841cb9b81a58131953dc93f04ffce0d73

push time in 1 week ago
Activity icon
issue

KunMinX issue comment KunMinX/Jetpack-MusicPlayer

KunMinX
KunMinX

【建议】关于PlayerController里的几个事件分发将setValue更改为postValue

这里的几个事件:

  private final MutableLiveData<ChangeMusic> changeMusicLiveData = new MutableLiveData<>();
  private final MutableLiveData<PlayingMusic> playingMusicLiveData = new MutableLiveData<>();
  private final MutableLiveData<Boolean> pauseLiveData = new MutableLiveData<>();
  private final MutableLiveData<Enum> playModeLiveData = new MutableLiveData<>();

在分发时都是使用的setValue,但是我在项目里的音频资源来自网络,在进行PlayerManager.getInstance().loadAlbum(album, 0)时会耗一些时间造成界面会卡一下,网络不好时甚至更会出现ANR,所以我将此方法放入了子线程,把里面的事件分发更改为postValue(),这样是不是更好一点,这样无论在子线程还是主线程能能使用。

测试音频

https://ws.stream.qqmusic.qq.com/C400003nGa8A3ysktw.m4a?guid=3710892&vkey=D9C0E0E81420C49A1B5346C3F6BF0A832DBE61A32F6E990C4C95A0EB0F17D91B58550AE7D018DF8EEBA47DAAE11CCE398531632F3A77D8AD&uin=626567678&fromtag=143

将移动网络调为3G测试网络慢的情况。

MediaPlayerHelper里去掉对格式的判断


  public boolean play(final String localPathOrURL) {
   //if (!checkAvalable(localPathOrURL)) {
   //   return false;
   //}
   ...
  }

MainFragment对资源进行替换:


mState.musicRequest.getFreeMusicsLiveData().observe(getViewLifecycleOwner(), dataResult -> {
      if (!dataResult.getResponseStatus().isSuccess()) return;
      TestAlbum musicAlbum = dataResult.getResult();
      for(TestAlbum.TestMusic music:musicAlbum.getMusics()){
        music.setUrl(URL);
      }
      .....
    });

如果这样,那么是否需要对格式进行判断,或者向外曝露一个额外的判断接口,是不是更好呢。

Jan
7
1 week ago
push

KunMinX push KunMinX/Jetpack-MusicPlayer

KunMinX
KunMinX

update setvalue to postvalue

KunMinX
KunMinX

Merge remote-tracking branch 'origin/master'

Conflicts:

build.gradle

gradle/wrapper/gradle-wrapper.properties

player/src/main/java/com/kunminx/player/PlayerController.java

commit sha: d2ce51bbc15510fb90394d3deed4723db3256965

push time in 1 week ago
Activity icon
issue

KunMinX issue comment KunMinX/Jetpack-MusicPlayer

KunMinX
KunMinX

【建议】关于PlayerController里的几个事件分发将setValue更改为postValue

这里的几个事件:

  private final MutableLiveData<ChangeMusic> changeMusicLiveData = new MutableLiveData<>();
  private final MutableLiveData<PlayingMusic> playingMusicLiveData = new MutableLiveData<>();
  private final MutableLiveData<Boolean> pauseLiveData = new MutableLiveData<>();
  private final MutableLiveData<Enum> playModeLiveData = new MutableLiveData<>();

在分发时都是使用的setValue,但是我在项目里的音频资源来自网络,在进行PlayerManager.getInstance().loadAlbum(album, 0)时会耗一些时间造成界面会卡一下,网络不好时甚至更会出现ANR,所以我将此方法放入了子线程,把里面的事件分发更改为postValue(),这样是不是更好一点,这样无论在子线程还是主线程能能使用。

测试音频

https://ws.stream.qqmusic.qq.com/C400003nGa8A3ysktw.m4a?guid=3710892&vkey=D9C0E0E81420C49A1B5346C3F6BF0A832DBE61A32F6E990C4C95A0EB0F17D91B58550AE7D018DF8EEBA47DAAE11CCE398531632F3A77D8AD&uin=626567678&fromtag=143

将移动网络调为3G测试网络慢的情况。

MediaPlayerHelper里去掉对格式的判断


  public boolean play(final String localPathOrURL) {
   //if (!checkAvalable(localPathOrURL)) {
   //   return false;
   //}
   ...
  }

MainFragment对资源进行替换:


mState.musicRequest.getFreeMusicsLiveData().observe(getViewLifecycleOwner(), dataResult -> {
      if (!dataResult.getResponseStatus().isSuccess()) return;
      TestAlbum musicAlbum = dataResult.getResult();
      for(TestAlbum.TestMusic music:musicAlbum.getMusics()){
        music.setUrl(URL);
      }
      .....
    });

如果这样,那么是否需要对格式进行判断,或者向外曝露一个额外的判断接口,是不是更好呢。

KunMinX
KunMinX
Dec
22
4 weeks ago
Activity icon
issue

KunMinX issue comment KunMinX/Linkage-RecyclerView

KunMinX
KunMinX

重新init数据后一级列表点击定位错误问题。

复现步骤,Demo的 MuchPrimaryItemSampleFragment,重新更换数据后滚动的联动是正常的。一级列表的点击有定位问题。

    mBinding.btnPreview.setOnClickListener(v -> {
//      mBinding.linkage.setGridMode(!mBinding.linkage.isGridMode());
      Gson gson = new Gson();
      List<ElemeGroupedItem> items = gson.fromJson(getString(R.string.eleme_json_6_food),
              new TypeToken<List<ElemeGroupedItem>>() {
              }.getType());

      mBinding.linkage.init(items, new MuchLinkagePrimaryAdapterConfig(), new MuchLinkageSecondaryAdapterConfig());
    });
 Gson gson = new Gson();
  //这里换为5
    List<ElemeGroupedItem> items = gson.fromJson(getString(R.string.eleme_json_5_food),
            new TypeToken<List<ElemeGroupedItem>>() {
            }.getType());

    linkage.init(items, new MuchLinkagePrimaryAdapterConfig(), new MuchLinkageSecondaryAdapterConfig());
    });

KunMinX
KunMinX
Activity icon
issue

KunMinX issue comment KunMinX/Linkage-RecyclerView

KunMinX
KunMinX

重新init数据后一级列表点击定位错误问题。

复现步骤,Demo的 MuchPrimaryItemSampleFragment,重新更换数据后滚动的联动是正常的。一级列表的点击有定位问题。

    mBinding.btnPreview.setOnClickListener(v -> {
//      mBinding.linkage.setGridMode(!mBinding.linkage.isGridMode());
      Gson gson = new Gson();
      List<ElemeGroupedItem> items = gson.fromJson(getString(R.string.eleme_json_6_food),
              new TypeToken<List<ElemeGroupedItem>>() {
              }.getType());

      mBinding.linkage.init(items, new MuchLinkagePrimaryAdapterConfig(), new MuchLinkageSecondaryAdapterConfig());
    });
 Gson gson = new Gson();
  //这里换为5
    List<ElemeGroupedItem> items = gson.fromJson(getString(R.string.eleme_json_5_food),
            new TypeToken<List<ElemeGroupedItem>>() {
            }.getType());

    linkage.init(items, new MuchLinkagePrimaryAdapterConfig(), new MuchLinkageSecondaryAdapterConfig());
    });

KunMinX
KunMinX

重新 init 的同时,手动 scrollTo 一级列表到 top 试试

Dec
21
4 weeks ago
started
started time in 4 weeks ago
started
started time in 4 weeks ago
Dec
11
1 month ago
Activity icon
issue

KunMinX issue KunMinX/Linkage-RecyclerView

KunMinX
KunMinX

ElemePrimaryAdapterConfig,ElemeSecondaryAdapterConfig 用kotlin 写的时候 报错

能出一个 kotlin版本的学习吗

Dec
9
1 month ago
push

KunMinX push KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump gradle from 7.0.3 to 7.0.4 (#106)

Bumps gradle from 7.0.3 to 7.0.4.


updated-dependencies:

  • dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit sha: 90381df39ccf8c0454a19527809b77593b40d44d

push time in 1 month ago
pull request

KunMinX pull request KunMinX/Jetpack-MVVM-Best-Practice

KunMinX
KunMinX

Bump gradle from 7.0.3 to 7.0.4

Bumps gradle from 7.0.3 to 7.0.4.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Dec
4
1 month ago
Activity icon
issue

KunMinX issue KunMinX/UnPeek-LiveData

KunMinX
KunMinX

持有Observer的activity退到后台,无法监听到事件,只有再回到前台时,才能接收到事件

持有Observer的activity退到后台,无法监听到事件,只有再回到前台时,才能接收到事件

Activity icon
issue

KunMinX issue comment KunMinX/UnPeek-LiveData

KunMinX
KunMinX

持有Observer的activity退到后台,无法监听到事件,只有再回到前台时,才能接收到事件

持有Observer的activity退到后台,无法监听到事件,只有再回到前台时,才能接收到事件

Previous