Olá gostaria de alterar o layoutgravity da imagem, que sempre irá ficar preenchida nos lados e no topo. Altero o layoutgravity mas não muda nada. Exemplo abaixo:
Código da Tela:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.aluno.tiposdeenergia.solar"
android:background="@mipmap/background_foto1">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:layout_height="230dp"
android:layout_width="match_parent"
app:srcCompat="@mipmap/energiasolar_foto2" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:layout_marginTop="5dp"
android:fontFamily="monospace"
android:text="Fontes de Energia Sustentáveis no Brasil"
android:textSize="24sp"
android:textStyle="bold|italic" />
<TextView
android:id="@+id/EnergiaSolar_Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:fontFamily="serif-monospace"
android:text="@string/Solar"
android:textAlignment="textStart"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>