I am making an android app..
In My xml file I have tried the below code:--
activity_registration
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/blue">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/txt22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dubai Tour and Travels"
android:textColor="#color/white"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:typeface="monospace"
android:layout_gravity="center"/>
</LinearLayout>
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginTop="40dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="10sp"
android:background="#color/shadow"
android:paddingLeft="15dip"
android:paddingRight="15dip">
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name"
android:textColor="#color/black"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:typeface="monospace"/>
<EditText
android:id="#+id/fieldFirstOpinion"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:minHeight="10sp"
android:hint="Name"/>
<TextView
android:id="#+id/tx2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email Id"
android:textColor="#color/black"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:typeface="monospace"/>
<EditText
android:id="#+id/ed2"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:minHeight="10sp"
android:hint="Email id"/>
<TextView
android:id="#+id/tx3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Mobile Number"
android:textColor="#color/black"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:typeface="monospace"/>
<EditText
android:id="#+id/ed3"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:minHeight="10sp"
android:hint="Mobile Number"
android:inputType="number"/>
<TextView
android:id="#+id/tx4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Mobile Number"
android:textColor="#color/black"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:typeface="monospace"/>
<Spinner
android:id="#+id/spinner1"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"/>
<TextView
android:id="#+id/tx5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Address"
android:textColor="#color/black"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:typeface="monospace"/>
<EditText
android:id="#+id/ed4"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:minHeight="10sp"
android:hint="Address" />
<Button
android:id="#+id/button1"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:text="Submit" />
</LinearLayout>
</ScrollView>
In this code I am getting my all data.
But I want the font and the style view as like:--That example page
In this page the textviews,edittext,button,spinner are arranged in a good way.they are very small size..
How can I achieve that??
It seems in your screenshot they used #android:drawable/editbox_background as EditText's background. You have to create a rounded corner button in xml and placed that in drawable folder.
Solution 1 :
create a folder named drawable inside res folder in your project.
create a xml file inside that drawable folder named
rounded_corner_btn
rounded_corner_btn xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#color/yellow" />
<corners
android:bottomLeftRadius="24dp"
android:bottomRightRadius="24dp"
android:topLeftRadius="24dp"
android:topRightRadius="24dp" />
</shape>
activity_registration xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/blue" >
<TextView
android:id="#+id/txt22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Dubai Tour and Travels"
android:textColor="#color/white"
android:textStyle="bold"
android:typeface="monospace" />
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginTop="40dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10sp"
android:background="#color/wallet_highlighted_text_holo_dark"
android:orientation="vertical"
android:paddingLeft="15dip"
android:paddingRight="15dip" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Name"
android:textColor="#color/black"
android:textStyle="bold"
android:typeface="monospace" />
<EditText
android:id="#+id/fieldFirstOpinion"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:hint="Name"
android:minHeight="10sp"
android:background="#android:drawable/editbox_background" />
<TextView
android:id="#+id/tx2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Email Id"
android:textColor="#color/black"
android:textStyle="bold"
android:typeface="monospace" />
<EditText
android:id="#+id/ed2"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:hint="Email id"
android:minHeight="10sp"
android:background="#android:drawable/editbox_background" />
<TextView
android:id="#+id/tx3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Mobile Number"
android:textColor="#color/black"
android:textStyle="bold"
android:typeface="monospace" />
<EditText
android:id="#+id/ed3"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:hint="Mobile Number"
android:inputType="number"
android:minHeight="10sp"
android:background="#android:drawable/editbox_background" />
<TextView
android:id="#+id/tx4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Mobile Number"
android:textColor="#color/black"
android:textStyle="bold"
android:typeface="monospace" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:background="#android:drawable/btn_dropdown" />
<TextView
android:id="#+id/tx5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Address"
android:textColor="#color/black"
android:textStyle="bold"
android:typeface="monospace" />
<EditText
android:id="#+id/ed4"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:hint="Address"
android:minHeight="10sp"
android:background="#android:drawable/editbox_background" />
<Button
android:id="#+id/button1"
android:layout_width="120dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:text="Submit"
android:textColor="#color/black_overlay"
android:background="#drawable/rounded_corner_btn" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
Solution 2:
Create .png images and set those images as background of those EditTexts, Spinner and Button using android:background="#drawable/image_name"
For custom font place a font inside asset folder. In code do like this
// Font path
String fontPath = "fonts/Face Your Fears.ttf"; //Face Your Fears.ttf is font name with extension
// text view label
TextView urTxtView = (TextView) findViewById(R.id.urTxtView);
// Loading Font Face
Typeface tf = Typeface.createFromAsset(getAssets(), fontPath);
// Applying font
urTxtView.setTypeface(tf);
You can take a look at this tutorial for setting up custom font
First of all try to not set the static height and width. Use wrap_content or match_parent with some margins(Android has a lot of screen sizes and on some devices your view can look very strange).
Create 9.patch file for background (http://developer.android.com/tools/help/draw9patch.html) in your Views. Use selectors for button.
Use shape for your EditTexts etc.(https://stackoverflow.com/a/3264140/3864698)
Customize your Spinner (http://mrbool.com/how-to-customize-spinner-in-android/28286)
Related
i am facing Problem In Relative layout
i set a textview below the description
but text taking topmargin from description
textview is PDFlink spacings are comming between pdf link and descrption
what is the problem
i m also sending you my layout file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00ffffff"
android:orientation="horizontal" >
<RelativeLayout
android:id="#+id/info_l1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="3dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="3dp"
>
<TextView
android:id="#+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sunilsunilsunil"
android:textStyle="bold"
android:visibility="gone"
android:textColor="#313131"
android:textSize="13sp" />
<TextView
android:id="#+id/aprrovedate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/title"
android:layout_marginTop="10dp"
android:textSize="12sp"
android:textStyle="bold"
android:textColor="#313131"
android:layout_below="#+id/backreturn"
android:text="TextView" />
<com.customviews.Fonttextview
android:id="#+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/aprrovedate"
android:layout_below="#+id/aprrovedate"
android:text="TextView"
android:textSize="13sp" />
<com.customviews.Underlintextview
android:id="#+id/pdflink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/description"
android:layout_below="#+id/description"
android:text="scarica PDF"
android:textSize="13sp"
android:textColor="#FF2A2A" />
<com.customviews.Underlintextview
android:id="#+id/backreturn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/title"
android:layout_below="#+id/title"
android:textColor="#FF2A2A"
android:textSize="12sp"
android:visibility="gone"
android:text="TextView" />
</RelativeLayout>
I want to create a listview like older gmail app. See the screenshot:
I tried putting an empty view like this:
<TextView
android:id="#+id/color_highlight"
android:layout_width="5dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="#ff0000"
android:minHeight="48dp" />
<TextView
android:id="#+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="#id/color_highlight"
android:text="Mudit Agarwal"
android:textStyle="bold"
android:textColor="#242424"
android:textIsSelectable="false"
android:textSize="22sp" />
<TextView
android:id="#+id/number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="#id/name"
android:layout_below="#id/name"
android:text="9933445566"
android:textColor="#777777"
android:textIsSelectable="false"
android:layout_marginBottom="10dp"
android:textSize="15sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:padding="3dp"
android:src="#drawable/contact" />
but this is not taking full height of the view. Please suggest.
What I changed is
android:layout_alignBottom="#+id/number"
to your color_highlight TextView. and instead of margin, I put padding like below in number TextView.
android:paddingBottom="20dp"
just put following layout code.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/color_highlight"
android:layout_width="5dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_alignBottom="#+id/number"
android:background="#ff0000"
android:minHeight="48dp" />
<TextView
android:id="#+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="#id/color_highlight"
android:text="Mudit Agarwal"
android:textColor="#242424"
android:textIsSelectable="false"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="#+id/number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="#id/name"
android:layout_below="#id/name"
android:paddingBottom="20dp"
android:text="9933445566"
android:textColor="#777777"
android:textIsSelectable="false"
android:textSize="15sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:padding="3dp"
android:src="#drawable/contact" />
</RelativeLayout>
I'm not sure but you can try putting android:layout_height="0dip" instead of android:layout_height="match_parent".
I created one registration page using relative layout and applied background image to main layout. Here I used scroll view for scrolling my contents.
Problem: when I selected my textfield, background image of main relative layout stretched.
Here is my xml content:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:androidcustomfont="http://schemas.android.com/apk/res/com.cpt.realtor.activity"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/background" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="615dp" >
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="680dp" >
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginTop="25dp"
android:src="#drawable/realtor_land_text" />
<EditText
android:id="#+id/editFirstName"
style="#style/activity_realtor_details_of_registration_tabletversion_for_textboxes"
android:layout_width="440dp"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:hint="#string/firstname"
android:inputType="textPersonName" >
<requestFocus />
</EditText>
<EditText
android:id="#+id/editLastName"
style="#style/activity_realtor_details_of_registration_tabletversion_for_textboxes"
android:layout_width="440dp"
android:layout_height="wrap_content"
android:layout_below="#+id/editFirstName"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:hint="#string/lastname"
android:inputType="textPersonName" />
<EditText
android:id="#+id/editCompany"
style="#style/activity_realtor_details_of_registration_tabletversion_for_textboxes"
android:layout_width="440dp"
android:layout_height="wrap_content"
android:layout_below="#+id/editLastName"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:hint="#string/company"
android:inputType="text" />
<EditText
android:id="#+id/editMobile"
style="#style/activity_realtor_details_of_registration_tabletversion_for_textboxes"
android:layout_width="440dp"
android:layout_height="wrap_content"
android:layout_below="#+id/editCompany"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:hint="#string/mobile"
android:imeOptions="actionDone"
android:inputType="phone"
android:maxLength="10" />
<EditText
android:id="#+id/editEmail"
style="#style/activity_realtor_details_of_registration_tabletversion_for_textboxes"
android:layout_width="440dp"
android:layout_height="wrap_content"
android:layout_below="#+id/editMobile"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:hint="#string/email"
android:inputType="textEmailAddress" />
<Spinner
android:id="#+id/spinnerForStates"
android:layout_width="440dp"
android:layout_height="wrap_content"
android:layout_below="#+id/editEmail"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp" />
<CheckBox
android:id="#+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/spinnerForStates"
android:layout_marginLeft="50dp"
android:layout_marginTop="15dp"
android:button="#drawable/checkbox_selector"
android:text="#string/receivealert"
android:textColor="#color/white"
android:textSize="18sp"
android:textStyle="bold" />
<com.cpt.realtor.utility.CustomFontButton
android:id="#+id/submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/checkBox"
android:layout_marginLeft="180dp"
android:layout_marginTop="10dp"
android:background="#drawable/share_btn_selector"
android:text="#string/submit"
android:textColor="#android:color/white"
android:textSize="20sp"
android:textStyle="bold"
androidcustomfont:customFontView="clarendon_regular.ttf" />
<TextView
android:id="#+id/textSkip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/submit"
android:layout_marginLeft="205dp"
android:layout_marginTop="8dp"
android:textSize="15sp"
android:text="#string/skip_this_step"
android:textColor="#color/white" />
<View
android:id="#+id/splitter"
android:layout_width="93dp"
android:layout_height="1dip"
android:layout_below="#+id/textSkip"
android:layout_marginLeft="210dp"
android:layout_marginTop="0dp"
android:background="#color/white" />
<View
android:id="#+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="#+id/textSkip"
android:background="#drawable/footer" />
</RelativeLayout>
</ScrollView>
without selecting TextField:
After selecting TextField:
In my second image, the background image stretched. How can I solve this?
In your manifest write this in activity tag
android:windowSoftInputMode="stateVisible|adjustPan"
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/relativelayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="30dp" >
<
android:id="#+id/uconnecttitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="25dp"
android:layout_marginBottom="5dp"
android:scaleType="centerInside"
android:src="#drawable/icon_logo_uconnect" />
<EditText
android:id="#+id/pwdfield"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/username"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:paddingLeft = "10dip"
android:background="#drawable/edittext_background"
android:hint="Password"
android:password="true"
android:textColor="#ffffff"
android:textColorHint="#d0d0d0"
android:textSize="24sp"
android:singleLine="true"
android:imeOptions="actionDone"
/>
<EditText
android:id="#+id/username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/pwdfield"
android:layout_below="#+id/uconnecttitle"
android:layout_marginTop="10dp"
android:paddingLeft = "10dip"
android:background="#drawable/edittext_background"
android:hint="Username"
android:textColor="#ffffff"
android:textColorHint="#d0d0d0"
android:textSize="24sp"
android:singleLine="true">
</EditText>
<TextView
android:id="#+id/TextVersionNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:textColor="#008000"
android:textSize="20sp"
android:text="#string/appVersionName"
android:visibility="gone"/>
<Button
android:id="#+id/loginbtn"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_alignRight="#+id/pwdfield"
android:layout_below="#+id/pwdfield"
android:layout_marginTop="10dp"
android:background="#drawable/button_custom"
android:text="#string/loginButton"
android:textColor="#ffffff"
android:textSize="28sp"
/>
<TextView
android:id="#+id/UserAlert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="#+id/pwdfield"
android:layout_below="#+id/username"
android:text="dfgfdgdfg"
android:textColor="#B0171F"
android:visibility="gone" />
<TextView
android:id="#+id/PwdAlert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="#+id/loginbtn"
android:layout_below="#+id/pwdfield"
android:text="dsfsdf"
android:textColor="#B0171F"
android:visibility="gone" />
<TextView
android:id="#+id/troubleLoggingIn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/loginbtn"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="#string/troubleLoggingIn"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0645AD" />
</RelativeLayout>
I need to push TextVersionNum down, I tried android:layout_marginBottom="0" but it does not bring the item down to the bottom. How can I move TextVersionNum as close to the bottom screen as possible? I also tried to set the padding for troubleLoggingIn, android:layout_marginBottom="0" but I do not see anything happen.
TextVersionNum might not be at the absolute bottom because if the container's padding:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/relativelayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="30dp" >
Try to set padding of the relativeLayout only for the other margins (top, left and right).
Whenever I create an ImageView in my XML the emulator crashes.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10px"
android:background="#drawable/words_background">
<EditText
android:id="#+id/letters"
android:layout_width="275dp"
android:layout_height="wrap_content"
android:hint="#string/enter_letters" />
<TextView
android:id="#+id/moreText"
android:text="#string/more"
android:layout_alignLeft="#id/letters"
android:layout_below="#id/letters"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="15dp"
android:typeface="normal"
android:paddingLeft="5dp"
android:textStyle="bold" />
<Spinner
android:id="#+id/maxSpinner"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_below="#id/letters"
android:layout_alignRight="#id/letters"
android:visibility="gone" />
<Spinner
android:id="#+id/minSpinner"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_below="#id/maxSpinner"
android:layout_alignRight="#id/letters"
android:visibility="gone" />
<TextView
android:id="#+id/lettersQuestion"
android:typeface="sans"
android:text="#string/question"
android:gravity="right"
android:textSize="20dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true">
</TextView>
<ImageView
android:id="#+id/logo_image" />
</RelativeLayout>
You are missing the + in a few of your id references, and layout_alignRight will accept "true" or "false" only (you are probably looking for layout_ToRightOf)toTherightOf! AND an ImageView needs height and width set to something.
You should definitely look at your LogCat for the exact error,
but your XML should look like this
<RelativeLayout id="#+id/rel_layout">
<Spinner
android:id="#+id/maxSpinner"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/letters"
android:visibility="gone"/>
<Spinner
android:id="#+id/minSpinner"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_below="#+id/maxSpinner"
android:layout_toRightOf="#+id/letters"
android:visibility="gone"/>
<TextView
android:id="#+id/lettersQuestion"
android:typeface="sans"
android:text="#string/question"
android:gravity="right"
android:textSize="20dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"/>
<ImageView
android:id="#+id/logo_image"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
</RelativeLayout>