答えは Singularity によって与えられます: フラグメント
http://developer.android.com/guide/components/fragments.html
フラグメントは、アクティビティの動作またはユーザー インターフェイスの一部を表します。複数のフラグメントを 1 つのアクティビティに結合して、マルチペイン UI を構築し、フラグメントを複数のアクティビティで再利用できます。フラグメントは、独自のライフサイクルを持ち、独自の入力イベントを受け取り、アクティビティの実行中に追加または削除できる、アクティビティのモジュラー セクションと考えることができます (「サブ アクティビティ」のようなもので、さまざまなアクティビティで再利用します)。
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.ViewGroup;
public class ArticleFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.article_view, container, false);
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<fragment android:name="com.example.android.fragments.HeadlinesFragment"
android:id="@+id/headlines_fragment"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent" />
<fragment android:name="com.example.android.fragments.ArticleFragment"
android:id="@+id/article_fragment"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="match_parent" />
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
public class MainActivity extends FragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.news_articles);
}
}