package com.marshalchen.common.demoofui.parallaxscrollexample; import android.app.Activity; import android.os.Bundle; import android.view.Gravity; import android.view.LayoutInflater; import android.widget.TextView; import com.marshalchen.common.uimodule.parallaxscroll.ParallaxExpandableListView; import com.marshalchen.common.demoofui.R; public class SingleParallaxExpandableListView extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.parallax_scroll_expand_list_one_parallax); ParallaxExpandableListView listView = (ParallaxExpandableListView) findViewById(R.id.list_view); TextView v = new TextView(this); v.setText("PARALLAXED"); v.setGravity(Gravity.CENTER); v.setTextSize(40); v.setHeight(200); v.setBackgroundResource(R.drawable.parallax_scroll_item_background); listView.addParallaxedHeaderView(v); CustomExpandableListAdapter adapter = new CustomExpandableListAdapter(LayoutInflater.from(this)); listView.setAdapter(adapter); } }