I m试图把两条文字写成线性语言。 这一线索在另一处,附有一份清单。
I think my XML is pretty correct. I fill my textViews dynamically in my Adapterclass. XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<TextView android:layout_height="wrap_content"
android:id="@+id/atlVacaturesnummer"
android:layout_width="wrap_content"
android:textColor="@color/Accent"
android:text="x"
/>
<TextView android:layout_height="wrap_content"
android:id="@+id/atlVacatures"
android:layout_width="wrap_content"
android:text="y"
/>
</LinearLayout>
<ListView android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false" />
<TextView android:layout_height="fill_parent"
android:id="@+id/android:empty"
android:layout_width="fill_parent"
android:text="Er zijn geen jobs die voldoen aan uw criteria..."
android:gravity="center"/>
</LinearLayout>
校服:
/*
* Klasse VacatureAdapter
*/
private class VacatureAdapter extends ArrayAdapter<Vacature>{
private ArrayList<Vacature> vacatures;
public VacatureAdapter(Context context, int textViewResourceId, ArrayList<Vacature> vacatures){
super(context, textViewResourceId, vacatures);
this.vacatures = getArray();
//System.out.println("Array vacatureadapter: " + v);
}
@Override
public View getView(int position, View convertview, ViewGroup parent){
View view = convertview;
if(view==null){
LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = vi.inflate(R.layout.vacature_list_item, null);
//view.setBackgroundColor((position % 2) == 1? Color.LTGRAY: Color.WHITE);
}
TextView atlVacatures = (TextView)findViewById(R.id.atlVacatures);
TextView atlVacaturesnr = (TextView)findViewById(R.id.atlVacaturesnummer);
atlVacaturesnr.setText("" + arrVacatures.size());
atlVacatures.setText(" jobs op maat gevonden!");
Vacature vaca = vacatures.get(position);
if(vaca != null){
TextView tvNaam = (TextView) view.findViewById(R.id.vacatureNaam);
TextView tvWerkveld = (TextView) view.findViewById(R.id.vacatureWerkveld);
TextView tvRegio = (TextView) view.findViewById(R.id.vacatureRegio);
if(tvNaam != null){
tvNaam.setText(vaca.getTitel());
if(tvWerkveld != null){
tvWerkveld.setText("Werkveld: " + vaca.getWerkveld());
if(tvRegio!=null){
tvRegio.setText("Regio: "+vaca.getRegio());
}
}
}
}
return view;
}
}
不容置疑的是,如果我的先辈们开车,他就会正确展示我的《冲锋枪》中的案文,如果主子停下来并填写我的《名单》,只显示我人数的一位数,而且当我显示我的人数,加上第二位文本意见时,他就坐下来了。 我不理解什么错误,或许有些法典需要一些地方?