0

I have a beach layout of 12 beaches. And i want to add each of them a tabhost with two tabs one info (this is default) and the other map. I have create two activities for each of the two info and map and one third to put together this two? I have to do and for the other 11 beaches?

4

1 に答える 1

0

どのような種類のデータがあるかはわかりませんが、合計 37 のアクティビティが必要です (「メイン」アクティビティが 1 つ、ビーチごとに 3 つのアクティビティ)。その通り、複雑すぎる。

代わりに、すべてのビーチ データをデータベースにドロップします。次に、情報を表示するビーチを選択したら、ユーザーを 2 タブ ビューに移動し、これらのタブで特定のビーチの地図と情報データをデータベースから取得します。

参考までに、2 つのタブのそれぞれに完全なアクティビティは必要ないでしょう。アクティビティが必要な特別な理由がない限り、代わりに各タブにビューを与えると、より軽量になります。

于 2012-04-30T20:35:06.607 に答える