Hi Thank you for read this Thread.

I want linked mynewviewClass with layout1.xml controls


But running Emulator app is broken  i want all process in my new View


i don't like that.
setContentView(R.layout.layout1);


i want like this
newclass _listView  = new newclass(context);
setContentView(_listView);


but dont match controls


=======layout1.xml begin===========


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
//my new view class extends View
    <com.test.android.proc.appname.mylistView
      id="@+id/mylistView"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"/>


     <RelativeLayout
     android:layout_width="fill_parent"
     android:layout_height="fill_parent" >


      <ListView
        android:id="@android:id/list"
                android:persistentDrawingCache="animation|scrolling"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@drawable/bg"/>
    </RelativeLayout>
</LinearLayout>
=======layout1.xml end===========
=======Activity begin===========
public class listAct extends ListActivity{
        /** Called when the activity is first created.
        *...@override
        */
        private friendlistView _listView;


        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                _listView = new friendlistView(this);
                setContentView(_listView);
                setListAdapter(_listView.getAdapter());
        }


}//


=======Activity end===========
=======new View begin===========
class mylistView extends CextendedView{
.....some codes

}


=======new View end===========




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to