Hi there,
Indeed, a greenhorn is what I am and I really like the expression! I prefer it above new bee, but then again: spring has only started, so I hope that this season will do me some good ;-)
Being trained both as an artist and art historian, I am completely new to this android stuff. I did a course on Coursera (
https://class.coursera.org/androidapps101-001) and I enjoyed it thoroughly. However, now I am rather struggling with things I thought would be easier and I am so in need of someone helping me out...
I am building an android layout with two vertical rows of images and text views. Only the thing is: the alignment of both rows is not in the middle, therefore the left row (first linear layout with vertical orientation) is far wider than the right one.
Please, let me know how I can fix this. Thanks, Fleur
This is a short version of what my xml code looks like:
<?xml version="1.0"?>
<ScrollView xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android: orientation="vertical"
tools:context=".PortfolioActivity" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="false"
android: orientation="horizontal"
android:weightSum="2" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android: orientation="vertical" >
<ImageView
android:id="@+id/Aint"
android:layout_width="140dp"
android:layout_height="185dp"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/aint"
android:padding="8dp"
android:src="@drawable/aint" />
<TextView
android:id="@+id/TitleAint"
style="@style/TitleText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/aint" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android: orientation="vertical" >
<TextView
android:id="@+id/TextView2"
style="@style/BaseText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello_world"
android:textStyle="bold" />
<ImageView
android:id="@+id/Areyou"
android:layout_width="140dp"
android:layout_height="140dp"
android:layout_gravity="center"
android:contentDescription="@string/areyou"
android:padding="8dp"
android:src="@drawable/areyou" />
</LinearLayout>
</LinearLayout>
</ScrollView>