This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MikaelZero
committed
Jul 27, 2021
1 parent
a2b0368
commit 1d14e19
Showing
73 changed files
with
1,197 additions
and
418 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
11 changes: 4 additions & 7 deletions
11
.../java/net/mikaelzero/app/GlideAdapter2.kt → .../mikaelzero/app/DifferentScenesAdapter.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
package net.mikaelzero.app | ||
|
||
import android.widget.FrameLayout | ||
import android.widget.ImageView | ||
import com.bumptech.glide.Glide | ||
import com.chad.library.adapter.base.BaseQuickAdapter | ||
import com.chad.library.adapter.base.viewholder.BaseViewHolder | ||
import com.facebook.drawee.backends.pipeline.Fresco | ||
import net.mikaelzero.mojito.tools.ScreenUtils | ||
|
||
/** | ||
* @Author: MikaelZero | ||
* @CreateDate: 2020/6/19 8:43 PM | ||
* @Description: | ||
*/ | ||
class GlideAdapter2 : BaseQuickAdapter<UrlBean, BaseViewHolder>(R.layout.item_grid) { | ||
class DifferentScenesAdapter : BaseQuickAdapter<UrlBean, BaseViewHolder>(R.layout.item_grid) { | ||
override fun convert(holder: BaseViewHolder, item: UrlBean) { | ||
val srcImageView = holder.getView<ImageView>(R.id.srcImageView) | ||
val srcImageView = holder.getView<FrameLayout>(R.id.srcImageView) | ||
(srcImageView.layoutParams as FrameLayout.LayoutParams).width = ScreenUtils.getScreenWidth(context) / 3 | ||
(srcImageView.layoutParams as FrameLayout.LayoutParams).height = ScreenUtils.getScreenWidth(context) / 3 | ||
if (item.type == 1) { | ||
Glide.with(context).load(item.url).into(srcImageView) | ||
srcImageView.addImg(item.url) | ||
} else { | ||
Glide.with(context).load(R.drawable.good).into(srcImageView) | ||
srcImageView.addImgLocal(R.drawable.good) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
11 changes: 4 additions & 7 deletions
11
.../java/net/mikaelzero/app/FrescoAdapter.kt → ...n/java/net/mikaelzero/app/ImageAdapter.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
package net.mikaelzero.app | ||
|
||
import android.net.Uri | ||
import android.widget.FrameLayout | ||
import android.widget.ImageView | ||
import com.chad.library.adapter.base.BaseQuickAdapter | ||
import com.chad.library.adapter.base.viewholder.BaseViewHolder | ||
import net.mikaelzero.mojito.tools.ScreenUtils | ||
|
||
|
||
/** | ||
* @Author: MikaelZero | ||
* @CreateDate: 2020/6/19 8:43 PM | ||
* @Description: | ||
*/ | ||
class FrescoAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_grid_fresco) { | ||
class ImageAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_grid) { | ||
override fun convert(holder: BaseViewHolder, item: String) { | ||
val srcImageView = holder.getView<ImageView>(R.id.srcImageView) | ||
val srcImageView = holder.getView<FrameLayout>(R.id.srcImageView) | ||
srcImageView.addImg(item) | ||
(srcImageView.layoutParams as FrameLayout.LayoutParams).width = ScreenUtils.getScreenWidth(context) / 3 | ||
(srcImageView.layoutParams as FrameLayout.LayoutParams).height = ScreenUtils.getScreenWidth(context) / 3 | ||
val uri = Uri.parse(item) | ||
srcImageView.setImageURI(uri) | ||
|
||
} | ||
} |
Oops, something went wrong.