mirror of
https://github.com/etesync/android
synced 2024-12-23 15:18:14 +00:00
Import: Make icon acessible and get it for address book.
This commit is contained in:
parent
15580374fa
commit
1227a66409
@ -19,6 +19,7 @@ import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.etesync.syncadapter.R;
|
||||
@ -197,6 +198,7 @@ public class LocalContactImportFragment extends Fragment {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private final TextView titleTextView;
|
||||
private final TextView descTextView;
|
||||
private final ImageView iconImageView;
|
||||
|
||||
public ViewHolder(View v, final OnAccountSelected onAccountSelected) {
|
||||
super(v);
|
||||
@ -209,14 +211,7 @@ public class LocalContactImportFragment extends Fragment {
|
||||
});
|
||||
titleTextView = (TextView) v.findViewById(R.id.title);
|
||||
descTextView = (TextView) v.findViewById(R.id.description);
|
||||
}
|
||||
|
||||
public TextView getTitleTextView() {
|
||||
return titleTextView;
|
||||
}
|
||||
|
||||
public TextView getDescriptionTextView() {
|
||||
return descTextView;
|
||||
iconImageView = (ImageView) v.findViewById(R.id.icon);
|
||||
}
|
||||
}
|
||||
|
||||
@ -242,8 +237,8 @@ public class LocalContactImportFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ViewHolder viewHolder, final int position) {
|
||||
viewHolder.getTitleTextView().setText(mAddressBooks.get(position).account.name);
|
||||
viewHolder.getDescriptionTextView().setText(mAddressBooks.get(position).account.type);
|
||||
viewHolder.titleTextView.setText(mAddressBooks.get(position).account.name);
|
||||
viewHolder.descTextView.setText(mAddressBooks.get(position).account.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,6 +7,7 @@
|
||||
android:paddingLeft="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
|
Loading…
Reference in New Issue
Block a user