Oh, never mind just solved it :)

On Thu, Aug 5, 2010 at 7:22 PM, kivy <[email protected]> wrote:

> Hi,
>
> I am trying to set up a RelativeLayout within a SlidingDrawer that
> contains a ViewFlipper that amongst others chooses a view with a text
> entry field, but when I test the application the space for the entry
> field and its label appears but the field itself doesn't show. I don't
> know what I missing here or may have done wrong. Any help or hint in
> the right direction would be really great. Thanks in advance
>
> This is my layout:
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>        android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    android:background="#99000000"
>    android:paddingLeft="2px"
>    >
>    <TextView
>        android:layout_width="fill_parent"
>                android:layout_height="wrap_content"
>                android:id="@+id/titlethemetitle"
>                android:text="@string/title_theme_title"
>                android:textColor="#99CC33"
>                android:textSize="20sp"
>                android:textStyle="bold"
>                android:layout_marginBottom="5px">
>    </TextView>
>    <TextView
>        android:layout_width="fill_parent"
>                android:layout_height="wrap_content"
>                android:id="@+id/titlethemeintro"
>                android:text="@string/title_theme_intro"
>                android:layout_below="@id/titlethemetitle"
>                android:layout_marginBottom="10px">
>    </TextView>
>    <TextView
>        android:layout_width="wrap_content"
>                android:layout_height="wrap_content"
>                android:id="@+id/titlethemeentryholder"
>                android:layout_below="@id/titlethemeintro">
>    </TextView>
>    <EditText
>        android:id="@+id/titlethemeentry"
>                android:layout_height="wrap_content"
>                android:layout_width="fill_parent"
>        android:layout_toLeftOf="@id/titlethemeentryholder"
>        android:layout_below="@id/titlethemeintro"
>        />
>    <ScrollView
>        android:layout_width="fill_parent"
>                android:layout_height="wrap_content"
>                android:layout_below="@id/titlethemeentry">
>        <RadioGroup
>                android:layout_width="fill_parent"
>                android:layout_height="wrap_content"
>                android:orientation="vertical"
>                android:id="@+id/radio_group_title_theme"
>                >
>                <RadioButton
>                        android:checked="true"
>                        android:text="@string/radio_group_title_theme_none"
>                        android:id="@+id/theme_none"
>                        android:textColor="#99CC33"
>                        />
>                <RadioButton
>                        android:checked="false"
>                        android:text="@string/radio_group_title_theme_1"
>                        android:id="@+id/theme_1"
>                        android:textColor="#99CC33"
>                        />
>                <RadioButton
>                        android:checked="false"
>                        android:text="@string/radio_group_title_theme_2"
>                        android:id="@+id/theme_2"
>                        android:textColor="#99CC33"
>                        />
>                <RadioButton
>                        android:checked="false"
>                        android:text="@string/radio_group_title_theme_3"
>                        android:id="@+id/theme_3"
>                        android:textColor="#99CC33"
>                        />
>                <RadioButton
>                        android:checked="false"
>                        android:text="@string/radio_group_title_theme_4"
>                        android:id="@+id/theme_4"
>                        android:textColor="#99CC33"
>                        />
>                <RadioButton
>                        android:checked="false"
>                        android:text="@string/radio_group_title_theme_5"
>                        android:id="@+id/theme_5"
>                        android:textColor="#99CC33"
>                        />
>        </RadioGroup>
>        </ScrollView>
> </RelativeLayout>
>
> Here is how I define and call the TextEntry field and its View
>
> public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.editorview);
>
> [...]
>
> txtTitleEntry = (EditText) findViewById(R.id.titlethemeentry);
>       txtTitleEntry.setOnKeyListener(new OnKeyListener() {
>            public boolean onKey(View v, int keyCode, KeyEvent event) {
>                // If the event is a key-down event on the "enter" button
>                if ((event.getAction() == KeyEvent.ACTION_DOWN) &&
>                    (keyCode == KeyEvent.KEYCODE_ENTER)) {
>                  // Perform action on key press
>                  Toast.makeText(EditorView.this,
> txtTitleEntry.getText(), Toast.LENGTH_SHORT).show();
>                  return true;
>                }
>                return false;
>
>
>            }
>        });
>
> }
>
>
> public void onClick(View v){
>
>                        [...]
>
>                        else if (v == btnTitle){
>                                mFlipper.setDisplayedChild(4);
>
>
> btnTitle.setImageDrawable(getResources().getDrawable(R.drawable.ic_slider_title_pressed));
>
>
> btnExposure.setImageDrawable(getResources().getDrawable(R.drawable.ic_slider_exposure_normal));
>
>
> btnProperties.setImageDrawable(getResources().getDrawable(R.drawable.ic_slider_properties_normal));
>
>
> btnRGB.setImageDrawable(getResources().getDrawable(R.drawable.ic_slider_rgb_normal));
>
>
> btnSpecialEffects.setImageDrawable(getResources().getDrawable(R.drawable.ic_slider_special_effects_normal));
>                        }
>
>                }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to