<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="70dp"
android:layout_height="55dp"
android:text="nope"
android:id="@+id/cancel_arrive"
android:onClick="selectNotGoing"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:id="@+id/attendingEventInListviewRow"
android:layout_width="match_parent"
android:layout_height="28dp"
android:text="eventsName"
android:height="30sp"
android:textSize="22sp"
android:gravity="right"
android:tag="eventsName"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="eventDayOfTheWeek"
android:textColor="#000000"
android:id="@+id/eventDayOfTheWeekTxt"
android:gravity="right"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="eventTime"
android:textColor="#000000"
android:id="@+id/eventTimeTxt"
android:gravity="right"
/>
</LinearLayout>
</LinearLayout>
ここで私が見つけた問題をGoogleに解決しようとしました。何も助けなかった。上のコードは私の現在のXMLです。右側にはeventName
、eventDayOfTheWeek
、eventTime
が必要です。レイアウトの右側にテキストを揃えることができません
私はまた、プロジェクトをクリーニングして再構築しようとしましたが、同じままです。打ち上げ前
(プレビューではテキストはそれが左に行く打ち上げ後、右側にある)
(プレビューで):打ち上げ後http://prntscr.com/db0ekp :http://prntscr.com/db0f7t
(レイアウト
私はそれを実行すると、テキストはTextViewsで右揃えです。あなたのケースで何が起きているのかを指定できますか? – weibeld
私はプレビュー中に右側のテキストも見ていますが、私がアプリを起動すると左に移動します。 – Jack
TextViewにさまざまな背景色を追加してください(例えば、 'android:background ="#FF0000 "')。何が起きているのか少し見てから、おそらく質問にスクリーンショットを投稿してください。 – weibeld