Ex: I have a project with UI contains a button.. Activity:
package android.tuanshaker.myproject.com;
import android.app.Activity;
import android.os.Bundle;
public class MyProjectActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
文件主主. xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
我想通过文字视图显示我的项目的代码和 xml 。 如何才能得到它们?