Skip to content

Commit

Permalink
提取string资源
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay committed Dec 4, 2017
1 parent 5209f21 commit 1314f38
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
public void onBindViewHolder(ViewHolder holder, int position) {
Media.Album item = getItem(position);
holder.mTextName.setText(item.name);
holder.mTextCount.setText(item.resourceCount + "张");
holder.mTextCount.setText(mContext.getString(R.string.daguerre_albums_member_count, item.resourceCount));
ImageLoader imageLoader = ConfigParams.getInstance().getImageLoader();
if (imageLoader != null) {
imageLoader.loadAlbumImage(mContext, holder.mImage, item.cover.data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,6 @@ public void onClick(View v) {
} else {
holder.mImageFlagIcon.setVisibility(View.GONE);
}
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// holder.mCheckBox.setButtonDrawable(R.drawable.daguerre_btn_check_material);
// } else {
//
// StateListDrawable stateListDrawable = new StateListDrawable();
//
// VectorDrawableCompat checkedDrawable = VectorDrawableCompat.create(mContext.getResources(), R.drawable.daguerre_circle_checked, mContext.getTheme());
// VectorDrawableCompat uncheckedDrawable = VectorDrawableCompat.create(mContext.getResources(), R.drawable.daguerre_circle_unchecked, mContext.getTheme());
//
// stateListDrawable.addState(new int[]{android.R.attr.state_checked}, checkedDrawable);
// stateListDrawable.addState(new int[]{}, uncheckedDrawable);
//
// int inset = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, mContext.getResources().getDisplayMetrics()));
// InsetDrawable insetDrawable = new InsetDrawable(stateListDrawable, inset);
// holder.mCheckBox.setButtonDrawable(insetDrawable);
// }
holder.mCheckBox.setChecked(getItem(position).isChecked);
holder.mCheckBox.setOnCheckedChangeListener(mOnCheckedChangeListener);
}
Expand Down
1 change: 1 addition & 0 deletions daguerre/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<string name="daguerre_not_found_camera_app">找不到相机应用</string>
<string name="daguerre_max_select">最多选择%1$d项</string>
<string name="daguerre_select">已选择%1$d项</string>
<string name="daguerre_albums_member_count">%1$d项</string>
</resources>

0 comments on commit 1314f38

Please sign in to comment.