开发者

Set ListView-Content to an other Activity

is it possible to set the Content of my Listview to an other Activity.

Something like i've done here with my tabhost-content.

        package de.retowaelchli.filterit;

    import android.app.TabActivity;
    import android.os.Bundle;
    import android.widget.TabHost;
    import android.content.Intent;

    public class StatsActivity extends TabActivity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.stats);
            TabHost tabHost = getTabHost();       

            tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("Smiley Filter").setContent(new Intent(this, SFilterStatsActivity.class)));
            tabHost.setCurrentTab(1); 

            tabHost.addTab(tabHost.newTabSpec("tab2").setIndicator("Auto Delete").setContent(new Intent(this, ADFilterStatsActivity.class)));

        }       
}

So, i just want to set the content of my ListView to an other Activity. Is that possible, i've yes how can i do that? Thx in Advance!

Best Regards safari

Some more information to understand, i'd like to realize that in this ACtivity:

package de.retowaelchli.filterit;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;


public class ADeleteActivity extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.autodelete);


    }
    /** Verweise auf die anderen Seiten **/
    public void onClickADConfig(View view){
        final Intent i = new Intent(this, ADFilterConfigActivity.class);
        startActivity(i); }
}

Here's the Layout for it:

   <LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:weightSum="1">


    <ListView android:id="@+id/AutoDeleteFilterListe" 
        开发者_运维百科android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        android:layout_weight="0.97">
    </ListView>


        <TableLayout 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/ADOverviewMainsite"
            android:layout_weight="0.03">

                <TableRow 
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"        
                    android:id="@+id/ADFilterOverview"
                    android:onClick="onClickADConfig"
                    android:layout_weight="0.03">
                        <TextView 

                            android:text="@string/newadfilter"  
                            style="@style/NormalFont"   />
                 </TableRow>
    </TableLayout>

</LinearLayout>

I WANT in this activity to set the Content of my Listview to an other .class. I hope you guys understand what i mean. :=)


I found out that it isn't possible to set the Content of a ListView to an other activity. Greetz safari

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜