私は自分のアプリのために見栄えの良いレイアウトを作成しましたが、のリニアレイアウト内に相対レイアウトを使用しました(私の必要に応じて)。アンドロイドでレイアウトを使用する方法に制限はありますか?
これは問題ありませんか?私のチームパートナーは、アンドロイドのガイドラインに従わないと言いました。これにより、アプリが検索の対象となります。
基本的には、の制限がレイアウトをどのように使用するべきかについて、また、アプリがプレイストアにあるときにこれらのコードを監視していますか?ここで
は、コード(編集後にそれを中に入れていた)
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/bio2"
android:layout_below="@+id/bio1"
android:orientation="horizontal"
android:layout_marginTop="15dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sagar Vakkala"
android:textStyle="bold"
android:textColor="#000"
android:id="@+id/namebio"
android:layout_marginLeft="15sp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/namebio"
android:textStyle="normal"
android:text="From Delhi to Chennai in a whiff :)"
android:textColor="#000"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
/>
</RelativeLayout>
</LinearLayout>
このような制限はありません。 –
ネストレイアウトはパフォーマンスに悪いです。 RelativeLayoutの相対性理論を利用してコンテナを取り除くことができます。 –
レイアウトの静的なファイルに基づいてアプリのランク付けをしているとは思えません。心配しないでください。時間をかけてレイアウトを最適化し、無駄なViewGroupを取り除く方法を学びます。 – natario