project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/PlayerListAdapter.java
changeset 7449 2e63537b44f3
parent 7358 57a508884052
child 7461 38acbfdb484f
equal deleted inserted replaced
7444:2e31f114f57e 7449:2e63537b44f3
    78 	
    78 	
    79 	public View getView(int position, View convertView, ViewGroup parent) {
    79 	public View getView(int position, View convertView, ViewGroup parent) {
    80 		View v = convertView;
    80 		View v = convertView;
    81 		if (v == null) {
    81 		if (v == null) {
    82 			LayoutInflater vi = LayoutInflater.from(context);
    82 			LayoutInflater vi = LayoutInflater.from(context);
    83 			v = vi.inflate(android.R.layout.simple_list_item_1, null);
    83 			v = vi.inflate(R.layout.listview_player, null);
    84 			TextView tv = (TextView)v.findViewById(android.R.id.text1);
       
    85 			tv.setCompoundDrawablePadding(5);
       
    86 			tv.setCompoundDrawablesWithIntrinsicBounds(R.drawable.human, 0, 0, 0);
       
    87 		}
    84 		}
    88 
    85 
    89 		String player = players.get(position).first.name;
    86 		String player = players.get(position).first.name;
    90 		TextView username = (TextView) v.findViewById(android.R.id.text1);
    87 		TextView username = (TextView) v.findViewById(android.R.id.text1);
    91 		username.setText(player);
    88 		username.setText(player);