0
私は自分のアプリケーションのデザインでxmlファイルを持っています。ここでは、LinearLayoutの後にTextViewを設定したいと考えています。しかし、私はこれをどのようにすることができますか?それは常に他の要素に表示されます。 「margin_top_elemnt_by_id」のようなものはありますか?私が何を意味するのか知っていれば幸いです他の要素の後にTextViewを設定する方法
私はpost_view_maintext
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
</android.support.design.widget.AppBarLayout>
<ImageView
android:layout_width="1440px"
android:layout_height="1000px"
android:id="@+id/post_view_photo"
android:transitionName="@string/transition_image"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@+id/post_view_photo"
android:src="@android:drawable/stat_notify_chat"
app:layout_anchorGravity="bottom|end" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@color/colorPrimary"
app:layout_anchor="@+id/post_view_photo"
app:layout_anchorGravity="bottom|start">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/username_text"
android:layout_gravity="center_vertical|start"
app:layout_anchor="@+id/post_view_photo"
app:layout_anchorGravity="bottom|start"
android:textSize="25dp"
android:transitionName="@string/transition_username"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="#414141"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/post_view_maintext"/>
</LinearLayout>
について感謝を語ります!
レイアウトXMLファイルをここに投稿できますか? – Wilik
あなたのXMLコードを入力してください – inkedTechie
はい、投稿しました@Wilik – user6586661