Я пытаюсь масштабировать группу изображений и textView, чтобы они масштабировались соответствующим образом на планшетах и телефонах. Масштабирование текстовых просмотров и изображений как одна группа в Android
Это выглядит отлично. Это то, что я хочу, чтобы достичь таблицы и также любого другого телефона, потому что он работает только на Nexus S 4" 480x800
Вопрос приходит с каким-либо другим размером экрана:
Я хотел бы масштабировать и текст и изображения, и держать их внутри круга
Мой главный макет:.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.balazs_gerendai.intentopener.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/circle" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center|top">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="192dp"
android:text="Hello" />
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/circle_placeholder"/>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="<Username>" />
</LinearLayout>
</RelativeLayout>
круг:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="100dp"
android:shape="ring"
android:thickness="10dp"
android:useLevel="false">
<solid android:color="#ababf2" />
</shape>