|
|
@ -20,9 +20,10 @@ import android.view.LayoutInflater; |
|
|
|
import android.view.View; |
|
|
|
import android.view.View; |
|
|
|
import android.view.ViewGroup; |
|
|
|
import android.view.ViewGroup; |
|
|
|
import android.widget.Button; |
|
|
|
import android.widget.Button; |
|
|
|
|
|
|
|
import android.widget.ImageView; |
|
|
|
import android.widget.TextView; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
|
|
|
|
import com.android.volley.toolbox.NetworkImageView; |
|
|
|
import com.squareup.picasso.Picasso; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
@ -88,7 +89,7 @@ class BlocksAdapter extends AccountAdapter { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static class BlockedUserViewHolder extends RecyclerView.ViewHolder { |
|
|
|
private static class BlockedUserViewHolder extends RecyclerView.ViewHolder { |
|
|
|
private NetworkImageView avatar; |
|
|
|
private ImageView avatar; |
|
|
|
private TextView username; |
|
|
|
private TextView username; |
|
|
|
private TextView displayName; |
|
|
|
private TextView displayName; |
|
|
|
private Button unblock; |
|
|
|
private Button unblock; |
|
|
@ -96,7 +97,7 @@ class BlocksAdapter extends AccountAdapter { |
|
|
|
|
|
|
|
|
|
|
|
BlockedUserViewHolder(View itemView) { |
|
|
|
BlockedUserViewHolder(View itemView) { |
|
|
|
super(itemView); |
|
|
|
super(itemView); |
|
|
|
avatar = (NetworkImageView) itemView.findViewById(R.id.blocked_user_avatar); |
|
|
|
avatar = (ImageView) itemView.findViewById(R.id.blocked_user_avatar); |
|
|
|
displayName = (TextView) itemView.findViewById(R.id.blocked_user_display_name); |
|
|
|
displayName = (TextView) itemView.findViewById(R.id.blocked_user_display_name); |
|
|
|
username = (TextView) itemView.findViewById(R.id.blocked_user_username); |
|
|
|
username = (TextView) itemView.findViewById(R.id.blocked_user_username); |
|
|
|
unblock = (Button) itemView.findViewById(R.id.blocked_user_unblock); |
|
|
|
unblock = (Button) itemView.findViewById(R.id.blocked_user_unblock); |
|
|
@ -108,8 +109,11 @@ class BlocksAdapter extends AccountAdapter { |
|
|
|
String format = username.getContext().getString(R.string.status_username_format); |
|
|
|
String format = username.getContext().getString(R.string.status_username_format); |
|
|
|
String formattedUsername = String.format(format, account.username); |
|
|
|
String formattedUsername = String.format(format, account.username); |
|
|
|
username.setText(formattedUsername); |
|
|
|
username.setText(formattedUsername); |
|
|
|
avatar.setImageUrl(account.avatar, |
|
|
|
Picasso.with(avatar.getContext()) |
|
|
|
VolleySingleton.getInstance(avatar.getContext()).getImageLoader()); |
|
|
|
.load(account.avatar) |
|
|
|
|
|
|
|
.error(R.drawable.avatar_error) |
|
|
|
|
|
|
|
.placeholder(R.drawable.avatar_default) |
|
|
|
|
|
|
|
.into(avatar); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void setupActionListener(final AccountActionListener listener, final boolean blocked, |
|
|
|
void setupActionListener(final AccountActionListener listener, final boolean blocked, |
|
|
|