i'm using android studio and i'm trying to follow this guide: http://ift.tt/1B5j7LV that implements database but i have problems with " R.layout.listactivity_row.
This guide not explain nowhere how and where to insert "listactiviry_row" Can you help me ?
`@Override public View newView(Context ctx, Cursor arg1, ViewGroup arg2) { View v=getLayoutInflater().inflate(R.layout.listactivity_row, null);
return v;
}`
this is main_activiry.xml
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="400dp"
xmlns:android="http://ift.tt/nIICcg">
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/oggetto"
android:hint="Oggetto"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="53dp"
android:layout_marginTop="20dp" />
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/testo"
android:hint="testo"
android:layout_below="@+id/oggetto"
android:layout_alignLeft="@+id/oggetto"
android:layout_alignStart="@+id/oggetto"
android:layout_marginRight="53dp" />
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/data"
android:hint="data"
android:layout_below="@+id/testo"
android:layout_alignLeft="@+id/testo"
android:layout_alignStart="@+id/testo" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="salva"
android:id="@+id/button"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="150dp"
android:layout_marginLeft="150dp" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="200dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:weightSum="1">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/txt_subject"
android:hint="subject" />
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/txt_date"
android:layout_marginLeft="110dp"
android:layout_marginTop="-16dp"
android:hint="data" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@android:drawable/ic_menu_delete"
android:id="@+id/btn_delete"
android:layout_gravity="right"
android:layout_marginRight="50dp"
android:layout_marginTop="-10dp" />
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/listView" />
</LinearLayout>
Aucun commentaire:
Enregistrer un commentaire