Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- itemList = new ArrayList<PostList>();
- applianceList = (ListView)findViewById(R.id.listView1);
- Button add = new Button(this);
- add.setBackgroundResource(R.drawable.add_button);
- applianceList.addFooterView(add);
- itemAdapter = new PostAdapterList(MainActivity.this, itemList);
- applianceList.setAdapter(itemAdapter);
- applianceList.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
- long arg3) {
- // TODO Auto-generated method stub
- Toast.makeText(getBaseContext(), "here", Toast.LENGTH_LONG).show();
- }
- });
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/background"
- android:id="@+id/main_activity"
- >
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
- <fragment
- android:id="@+id/fragment1"
- android:name="com.example.thesis.Appliance"
- android:layout_width="225dp"
- android:layout_height="225dp"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/TextView01"
- android:layout_marginRight="25dp"
- android:layout_marginTop="15dp" />
- <ListView
- android:id="@+id/listView1"
- android:layout_width="60dp"
- android:layout_height="fill_parent"
- android:layout_alignParentBottom="true"
- android:layout_alignTop="@+id/fragment1"
- android:layout_marginLeft="25dp"
- android:layout_marginRight="25dp"
- android:background="#3D76AD" >
- </ListView>
- <TextView
- android:id="@+id/fill"
- android:layout_width="60dp"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/listView1"
- android:layout_below="@+id/TextView01"
- android:background="#3D76AD" />
- <TextView
- android:id="@+id/fill2"
- android:layout_width="60dp"
- android:layout_height="30dp"
- android:layout_alignLeft="@+id/fill"
- android:layout_alignParentTop="true"
- android:background="#3D76AD" />
- <TextView
- android:id="@+id/TextView01"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@+id/fill2"
- android:background="#3D76AD"
- android:paddingLeft="10dp"
- android:text="Profile"
- android:textColor="#000000"
- android:textSize="30dp" />
- </RelativeLayout>
- </LinearLayout>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_width="wrap_content"
- android:paddingLeft="5dp">
- <ImageView
- android:id="@+id/appliance_icon"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:src="@drawable/defaultimage" />
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement