如题。 
    
         类似微信的这种UI。   
           
         有的粘下。 
          刚刚接触。 
              谢谢。。
         
     

解决方案 »

  1.   

    首先是:TabBottomActivityimport android.app.TabActivity;
    import android.content.Intent;
    import android.graphics.Color;
    import android.os.Bundle;
    import android.view.Window;
    import android.widget.TabHost;
    import android.widget.TabHost.TabSpec;public class TabBottomActivity extends TabActivity { @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.tabview); TabHost tabHost = getTabHost();
    TabView view = null; // 音乐包
    view = new TabView(this, R.drawable.yyb, R.drawable.yyb_sel);
    view.setBackgroundColor(Color.WHITE);
    TabSpec spec1 = tabHost.newTabSpec("Music");
    spec1.setIndicator(view);
    Intent musicIntent = new Intent(this, MyMusicActivity.class);
    spec1.setContent(musicIntent); // 本地
    view = new TabView(this, R.drawable.local, R.drawable.local_sel);
    view.setBackgroundColor(Color.WHITE);
    TabSpec spec2 = tabHost.newTabSpec("Local");
    spec2.setIndicator(view);
    Intent localIntent = new Intent(this, LocalActivity.class);
    spec2.setContent(localIntent); // 收藏
    view = new TabView(this, R.drawable.fav, R.drawable.fav_sel);
    view.setBackgroundColor(Color.WHITE);
    TabSpec spec3 = tabHost.newTabSpec("Fav");
    spec3.setIndicator(view);
    Intent favIntent = new Intent(this, FavActivity.class);
    spec3.setContent(favIntent); // 搜索
    view = new TabView(this, R.drawable.search, R.drawable.search_sel);
    view.setBackgroundColor(Color.WHITE);
    TabSpec spec4 = tabHost.newTabSpec("Search");
    spec4.setIndicator(view);
    Intent searchIntent = new Intent(this, SearchActivity.class);
    spec4.setContent(searchIntent); tabHost.addTab(spec1);
    tabHost.addTab(spec2);
    tabHost.addTab(spec3);
    tabHost.addTab(spec4);
    tabHost.setCurrentTab(0);
    }}
    然后是:tabview.xml
    <?xml version="1.0" encoding="utf-8"?>
    <TabHost android:layout_width="fill_parent" android:background="@drawable/bg"
    android:layout_height="fill_parent" android:id="@android:id/tabhost"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:orientation="vertical"
    android:padding="3dp">
    <FrameLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:id="@android:id/tabcontent"
    android:layout_weight="1">
    </FrameLayout>
    <TabWidget android:layout_width="fill_parent"
    android:layout_height="50dip" android:id="@android:id/tabs"
    android:layout_alignBottom="@android:id/tabcontent" />
    </RelativeLayout>
    </TabHost>  最后是:MyMusicActivity
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.BaseAdapter;
    import android.widget.LinearLayout;
    import android.widget.ListView;public class MyMusicActivity extends Activity {
    ListView listView; @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    listView = new ListView(this);
    listView.setAdapter(new BaseAdapter() { @Override
    public View getView(int position, View convertView, ViewGroup parent) {
    LayoutInflater inflater = getLayoutInflater();
    LinearLayout layout = (LinearLayout) inflater.inflate(
    R.layout.music, null);
    return layout;
    } @Override
    public long getItemId(int position) {
    return 0;
    } @Override
    public Object getItem(int position) {
    return null;
    } @Override
    public int getCount() {
    return 5;
    }
    });
    setContentView(listView);
    }}FavActivity\SearchActivity\LocalActivity,自己去定义好了
      

  2.   

    tab              http://www.eoeandroid.com/thread-53207-1-1.html
    listView       http://blog.csdn.net/xiaominghimi/article/details/6314704
      

  3.   

    http://blog.csdn.net/ch_984326013/article/details/6602602上面那个是tabHost,至于listView你可以在布局中添加该控件就可了!