This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Showing
63 changed files
with
1,363 additions
and
943 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
39 changes: 39 additions & 0 deletions
39
app/src/main/java/my/project/sakuraproject/adapter/AnimeDescDetailsAdapter.java
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package my.project.sakuraproject.adapter; | ||
|
||
import android.content.Context; | ||
import android.widget.Button; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
import com.chad.library.adapter.base.BaseQuickAdapter; | ||
import com.chad.library.adapter.base.BaseViewHolder; | ||
|
||
import java.util.List; | ||
|
||
import my.project.sakuraproject.R; | ||
import my.project.sakuraproject.bean.AnimeDescDetailsBean; | ||
|
||
/** | ||
* 播放列表适配器 | ||
*/ | ||
public class AnimeDescDetailsAdapter extends BaseQuickAdapter<AnimeDescDetailsBean, BaseViewHolder> { | ||
private Context context; | ||
|
||
public AnimeDescDetailsAdapter(Context context, @Nullable List<AnimeDescDetailsBean> data) { | ||
super(R.layout.item_desc_details, data); | ||
this.context = context; | ||
} | ||
|
||
@Override | ||
protected void convert(final BaseViewHolder helper, AnimeDescDetailsBean item) { | ||
Button btn = helper.getView(R.id.tag_group); | ||
helper.setText(R.id.tag_group, item.getTitle().replaceAll("第", "").replaceAll("集", "")); | ||
if (item.isSelected()) { | ||
helper.getView(R.id.tag_group).setBackgroundResource(R.drawable.button_selected); | ||
btn.setTextColor(context.getResources().getColor(R.color.tabSelectedTextColor)); | ||
} else { | ||
helper.getView(R.id.tag_group).setBackgroundResource(R.drawable.button_default); | ||
btn.setTextColor(context.getResources().getColor(R.color.text_color_primary)); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
app/src/main/java/my/project/sakuraproject/adapter/AnimeDescDramaAdapter.java
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package my.project.sakuraproject.adapter; | ||
|
||
import android.content.Context; | ||
import android.widget.Button; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
import com.chad.library.adapter.base.BaseQuickAdapter; | ||
import com.chad.library.adapter.base.BaseViewHolder; | ||
|
||
import java.util.List; | ||
|
||
import my.project.sakuraproject.R; | ||
import my.project.sakuraproject.bean.AnimeDescDetailsBean; | ||
|
||
/** | ||
* 展开播放列表适配器 | ||
*/ | ||
public class AnimeDescDramaAdapter extends BaseQuickAdapter<AnimeDescDetailsBean, BaseViewHolder> { | ||
private Context context; | ||
|
||
public AnimeDescDramaAdapter(Context context, @Nullable List<AnimeDescDetailsBean> data) { | ||
super(R.layout.item_desc_drama, data); | ||
this.context = context; | ||
} | ||
|
||
@Override | ||
protected void convert(final BaseViewHolder helper, AnimeDescDetailsBean item) { | ||
Button btn = helper.getView(R.id.tag_group); | ||
helper.setText(R.id.tag_group, item.getTitle().replaceAll("第", "").replaceAll("集", "")); | ||
if (item.isSelected()) { | ||
helper.getView(R.id.tag_group).setBackgroundResource(R.drawable.button_selected); | ||
btn.setTextColor(context.getResources().getColor(R.color.tabSelectedTextColor)); | ||
} else { | ||
helper.getView(R.id.tag_group).setBackgroundResource(R.drawable.button_default); | ||
btn.setTextColor(context.getResources().getColor(R.color.text_color_primary)); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
app/src/main/java/my/project/sakuraproject/adapter/AnimeDescRecommendAdapter.java
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package my.project.sakuraproject.adapter; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
import com.chad.library.adapter.base.BaseQuickAdapter; | ||
import com.chad.library.adapter.base.BaseViewHolder; | ||
|
||
import java.util.List; | ||
|
||
import my.project.sakuraproject.R; | ||
import my.project.sakuraproject.bean.AnimeDescRecommendBean; | ||
import my.project.sakuraproject.util.Utils; | ||
|
||
/** | ||
* 相关推荐适配器 | ||
*/ | ||
public class AnimeDescRecommendAdapter extends BaseQuickAdapter<AnimeDescRecommendBean, BaseViewHolder> { | ||
private Context context; | ||
|
||
public AnimeDescRecommendAdapter(Context context, @Nullable List<AnimeDescRecommendBean> data) { | ||
super(R.layout.item_desc_recommend, data); | ||
this.context = context; | ||
} | ||
|
||
@Override | ||
protected void convert(final BaseViewHolder helper, AnimeDescRecommendBean item) { | ||
Utils.setCardDefaultBg(context, helper.getView(R.id.card_view), helper.getView(R.id.title)); | ||
helper.setText(R.id.title, item.getTitle()); | ||
Utils.setDefaultImage(context, item.getImg(), helper.getView(R.id.img)); | ||
Utils.setCardBg(context, item.getImg(), helper.getView(R.id.card_view), helper.getView(R.id.title)); | ||
} | ||
} |
79 changes: 0 additions & 79 deletions
79
app/src/main/java/my/project/sakuraproject/adapter/DescAdapter.java
This file was deleted.
Oops, something went wrong.
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
105 changes: 0 additions & 105 deletions
105
app/src/main/java/my/project/sakuraproject/bean/AnimeDescBean.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.