У меня есть XML-файл с RelativeLayout, у меня также есть Textview с Gravity Center. В коде я хотел бы получить координату X этого Textview, где начинается TextView (длина TextView не постоянна, она может измениться). Мне нужно, чтобы ImageView был рядом с TextView.Как сделать ImageView слева от TextView, когда Textview является HorizontalCentered
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
android:gravity="center"
android:text="TextView" /> `
countryText = (TextView) findViewById(R.id.textView6);
countryText.getLeft()
getLeft() return 0;