更改android FC中的活动

时间:2013-02-15 17:16:20

标签: android

当我想在我的应用程序中启动新活动时,它只是FC,要更改的代码是:

            myIntent = new Intent( this,about.class);
        startActivity(myIntent);

并且关于类是

    package com.arash.rz.webtar;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;


public   class about extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about);

}

然后,当在新的主代码中我触摸执行代码的菜单时,我在模拟器和/或手机中获得了fc

1 个答案:

答案 0 :(得分:1)

您必须在清单中添加第二个活动类 例如:

<activity android:name=".SecondActivityClass"/> 

只需在

之后添加
</activity>