I have a Ui which shows customer information. The problem I have is some customer name(android:id="#+id/customerName") is long and does not fit in the textview. what option i ahev to beable to display them other then the option to give full layout width to the name or removing the code textview from next to it(as seen in the xml file android:id="#+id/customerName").
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="*" >
<TableRow>
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/customerCode" />
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/customerName" />
</TableRow>
<TableRow>
<TextView
android:id="#+id/customerCode"
style="#style/CustomerTextView"
android:gravity="right" />
<TextView
android:id="#+id/customerName"
style="#style/CustomerTextView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:gravity="right"
android:maxEms="5" />
</TableRow>
<TableRow android:gravity="right" >
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/customerAddress" />
</TableRow>
<TableRow android:gravity="right" >
<TextView
android:id="#+id/customerAddress"
style="#style/CustomerTextView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:gravity="right"
android:maxEms="5"
/>
</TableRow>
<TableRow>
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/POBox" />
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/OrganizationName" />
</TableRow>
<TableRow>
<TextView
android:id="#+id/poBox"
style="#style/CustomerTextView"
android:gravity="right" />
<TextView
android:id="#+id/organizationName"
style="#style/CustomerTextView"
android:gravity="right" />
</TableRow>
<TableRow>
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/fax" />
<TextView
style="#style/CustomerLabelTextView"
android:gravity="right"
android:text="#string/phone" />
</TableRow>
====================================STYLE++++++++++++++++++++++++++++++++++++++++
<style name="CustomerTextView">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">#android:color/white</item>
<item name="android:layout_margin">5dp</item>
<item name="android:background">#drawable/textview_border</item>
I fixed it by using
android:layout_height="wrap_content"
android:inputType="textMultiLine"
hope this works for you too.
One option is to make it ellipsize, so if a name is 'Really Long Name", it might show up as "Really Lon...". To do this:
android:ellipsize="end"
android:singleLine="true"
On the other hand, you can make the textview change size to fit the text using:
android:layout_width="wrap_content"
But I'm not sure if it'll work with everything else you're trying to do (eg fill_parent and width inside a tablerow)
remove the android:maxEms="5" line in xml file and than try
You can make the TextView expand to a second line by setting singleLine attribute to false.
<TextView
android:singleLine="false"
/>
You can try and make the textview scrollable so that when the data to display is too much,scrolling will reveal the hidden text.
In the xml file,change LinearLayout to ScrollView layout.
Related
I have two listviews and two different adapters for them. one shows the bottom divider but the other list does not show divider after the last item.
The one which shows divider after last item, only has listview in the layout. other one which does not shows divider has other views along with the listview.
both listviews have the same style which is below.
<style name="st_comman_data_list">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:background">#color/app_background_color</item>
<item name="android:cacheColorHint">#color/app_background_color</item>
<item name="android:drawSelectorOnTop">true</item>
<item name="android:fadeScrollbars">true</item>
<item name="android:fadingEdge">none</item>
<item name="android:focusableInTouchMode">true</item>
<item name="android:listSelector">#drawable/list_states_color</item>
<item name="android:scrollbarFadeDuration">1000</item>
<item name="android:fastScrollEnabled">true</item>
</style>
Edit
layout xml for correct divider
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/app_background_color_light"
android:orientation="vertical" >
<ListView
android:id="#+id/gift_home_ui_home_list"
style="#style/st_comman_data_list"
android:layout_height="match_parent" />
xml which don't shows divider
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/app_background_color"
android:cacheColorHint="#color/app_background_color"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/background_header"
android:gravity="center"
android:visibility="gone" >
<Button
android:id="#+id/tab_video_main_btn_all"
style="#style/st_btn_top_header_gry"
android:layout_marginRight="2dp"
android:text="#string/st_tab_main_btn_all" />
<Button
android:id="#+id/tab_video_main_btn_my_videos"
style="#style/st_btn_top_header_gry"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:text="#string/st_tab_video_main_btn_my_videos"
android:visibility="visible" />
<Button
android:id="#+id/tab_video_main_btn_saved"
style="#style/st_btn_top_header_gry"
android:layout_marginLeft="2dp"
android:text="#string/st_tab_main_btn_saved" />
</LinearLayout>
<View style="#style/st_single_black_line" />
<TableLayout
android:id="#+id/video_search_holder"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#drawable/background_header_small"
android:focusableInTouchMode="false"
android:gravity="left"
android:stretchColumns="0"
android:visibility="gone" >
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_margin="#dimen/margin_basic_very_large"
android:background="#drawable/audio_search_bg"
android:gravity="left|center_vertical"
android:paddingLeft="#dimen/padding_basic_2dp"
android:paddingRight="#dimen/padding_basic_2dp" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" >
<ImageButton
android:id="#+id/video_btn_search_clear"
style="#style/st_search_ui_ic_search"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="12dp"
android:src="#drawable/ic_clear_search"
android:visibility="gone" />
<ImageButton
android:id="#+id/video_btn_search"
style="#style/st_search_ui_ic_search"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:src="#drawable/ic_search" />
<EditText
android:id="#+id/video_search_edit_text"
style="#style/st_search_ui_search_bar"
android:layout_toLeftOf="#id/video_btn_search_clear"
android:layout_toRightOf="#id/video_btn_search"
android:focusable="false"
android:focusableInTouchMode="false"
android:hint="#string/hint_search_by_video_title_or_description"
android:imeOptions="actionDone"
android:singleLine="true"
android:windowSoftInputMode="stateVisible|adjustResize" />
</RelativeLayout>
</TableRow>
</TableLayout>
<ListView
android:id="#+id/no_more_text_list"
style="#style/st_no_more_text_list"
android:visibility="gone" />
<ListView
android:id="#+id/video_chanel_list"
style="#style/st_comman_data_list" />
<View
android:id="#+id/invisible"
android:layout_width="match_parent"
android:layout_height="1dp" />
Solutions which i have tried:
set height as "match_parent"
add a view under the list view and make it invisible
set footer divider as enabled (which is true by default)
Someone have any ides why it is behaving differently?
I have the following xml to display rows in a listView. I want the TextView with the id rowCreatedAt, to wrap around nicely but it never does and only shows 1 line. I tried most of the solutions in the other questions and added them in the code, but it still doesn't work. Can anyone tell me why...?
+I would like to avoid setting the exact size to the textview.
++ To put it differently, why does the rowCreatedAt textView doesn't wrap the text when width/height is set to fill_parent while other textViews wrap texts just fine?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="5dp"
android:layout_marginBottom="5dp" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="#+id/rowUserImage"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/twitter_icon"
android:layout_margin="5dp"/>
<TextView
android:id="#+id/rowCreatedAt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="10dp"
android:textColor="#ff696969"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:layout_weight="1"
android:maxLines="100"
android:text="aaaaaaaaaaaaaaabbbbbbbbbbbbbb" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/rowUserName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="username"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/rowText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="status text" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/rowCreatedAt"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="10dp"
android:textColor="#ff696969"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:layout_weight="1"
android:maxLines="100"
android:text="aaaaaaaaaaaaaaabbbbbbbbbbbbbb" />
Change android:layout_width="fill_parent" to android:layout_width="200dp"
Try like this :
<TextView
android:id="#+id/Lesson_Description"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:minLines="4"
android:maxLines="6"
android:gravity="right|center"
android:background="#drawable/filed_shape_corner"
android:inputType="textMultiLine" />
Then do something like in code :
mLessonDescription = (TextView) rootView
.findViewById(R.id.Lesson_Description);
mLessonDescription.setMovementMethod(new ScrollingMovementMethod());
Try out be setting android:ems="10" it will make your edittext that much wide and wraps the other characters.
OR
You should use android:ellipsize="marquee". If you do not want to fix the height.
Add the following style changes to fix the width problem. along with the initial changes
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:singleLine">false</item>
<item name="android:maxLines">100</item>
<item name="android:width">0dp</item>
<item name="android:layout_weight">1</item>
I am quite new to android and i am designing a Table layout with every row containing two textviews.The problem is that the text in textview gets truncated if text is long.I have used wrap content and applied weight also but not help me .The code for layout is below
<TableLayout
android:id="#+id/tableLayout"
style="#style/fill_parent_wrap_content" >
<TableRow style="#style/both_wrap_content" >
<TextView
style="#style/InfoTextView1"
android:text="#string/customerName"
android:textStyle="bold" />
<TextView
android:id="#+id/txtDetailCustomerName"
style="#style/InfoTextView1" />
</TableRow>
<TableRow style="#style/both_wrap_content" >
<TextView
style="#style/InfoTextView1"
android:text="#string/caNumberDetail"
android:textStyle="bold" />
<TextView
android:id="#+id/txtDetailCaNo"
style="#style/InfoTextView1" />
</TableRow>
<TableRow style="#style/both_wrap_content" >
<TextView
style="#style/InfoTextView1"
android:text="#string/customerAddress"
android:textStyle="bold" />
<TextView
android:id="#+id/txtDetailAddress"
style="#style/InfoTextView1"
/>
</TableRow>
</TableLayout>
</Scrollview>
This is a style that i apply to textviews
<style name="InfoTextView1">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">5dp</item>
<item name="android:paddingTop">15dp</item>
<item name="android:textColor">#color/Black</item>
<item name="android:textSize">#dimen/text_size_small</item>
</style>
Try this..
<TableRow
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:weightSum="2">
<TextView
android:layout_height="50dp"
android:layout_width="0dp"
android:layout_weight="1"
android:singleLine="true"
android:ellipsize="marquee"/>
<TextView
android:layout_height="50dp"
android:layout_width="0dp"
android:layout_weight="1"
android:singleLine="true"
android:ellipsize="marquee"/>
</TableRow>
Then put this line in java file textview.setSelected(true);
Show the style for the TableLayout and TableRows...
I bet the problem is on them.
If you're interested in RadioButtons in addition to (or instead of) CheckBoxes, see this question instead.
Despite the presence of
<item name="android:layout_gravity">center_horizontal</item>
in the style file, the two checkboxes are not centered, but appear "left-justified".
res/layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/MyLL"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<CheckBox
android:id="#+id/cb1"
style="#style/CB_style" />
<CheckBox
android:id="#+id/cb2"
style="#style/CB_style" />
</LinearLayout>
res/values/styles.xml
<style name="CB_style" parent="#android:style/TextAppearance.Medium">
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_weight">1</item>
<item name="android:gravity">center</item>
<item name="android:checked">false</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
You have android:layout_weight = 1. So your checkboxes fill all width of screen.
Remove android:layout_weight from style and add margin between checkboxes.
Gravity in Checkbox don't affect the inner tick button, only text.
EDIT
Ok, try this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/MyLL"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="5dp"
android:layout_weight="1"/>
<CheckBox
android:id="#+id/cb1"
style="#style/CB_style" />
<TextView
android:layout_width="0dp"
android:layout_height="5dp"
android:layout_weight="1"/>
<CheckBox
android:id="#+id/cb2"
style="#style/CB_style" />
<TextView
android:layout_width="0dp"
android:layout_height="5dp"
android:layout_weight="1"/>
</LinearLayout>
And remove layout_weight from style.
Another way is create custom checkbox. But I think it's too complicated for this problem.
Here's something that may help:
android:gravity vs android:layout_gravity
android:gravity is usually internal, usually asking the view itself what to do with the pixels it has
android:layout_gravity is usually external, usually asking the parent ViewGroup (LinearLayout/RelativeLayout/FrameLayout) how to position the view with extra pixels that the view is not using
If you are using a view with wrap_content, you probably want to use layout_gravity. If you are using a view with match_parent, you probably want to try gravity.
Sometimes wrapping another ViewGroup around a troublesome View can help with positioning. Views and ViewGroups go through an intricate "screen space" negotiating phase, and different Views (Buttons/TextView/ImageView/etc) and ViewGroups (LinearLayout/RelativeLayout/TableLayout/etc) have different rules and negotiating powers
This is why sometimes pairing a troublesome View with another parent like a FrameLayout or LinearLayout can make it behave all of the sudden
This is a little messy but it works, and yes it works as well for 3 or more checkbox inputs:
<LinearLayout
android:padding="0dip"
android:layout_width="0dp"
android:layout_weight="1"
android:hint="name"
android:layout_height="40dip"
android:textAlignment="center" android:layout_gravity="center"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dip"
android:layout_height="1dip" android:layout_weight="1" android:text=" " />
<CheckBox
android:id="#+id/chk1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:scaleX="1.5" android:scaleY="1.5"
>
</CheckBox>
<TextView
android:layout_width="0dip"
android:layout_height="1dip" android:layout_weight="1" android:text=" " />
<CheckBox
android:id="#+id/chk2"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:scaleX="1.5" android:scaleY="1.5"
>
</CheckBox>
<TextView
android:layout_width="0dip"
android:layout_height="1dip" android:layout_weight="1" android:text=" " />
</LinearLayout>
Try it in style
<item name="android:layout_width">0dp</item>
I hope it will work.. thanks..
<style name="TextlessCheckBox" parent="android:Widget.Material.CompoundButton.CheckBox">
<item name="android:button">#null</item>
<item name="android:foreground">?android:listChoiceIndicatorMultiple</item>
<item name="android:foregroundGravity">center</item>
</style>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/MyLL"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="#ff0000"
android:gravity="center" >
<CheckBox
android:id="#+id/cb1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="#00FF00"
android:gravity="center" >
<CheckBox
android:id="#+id/cb2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
ok, last try for today ;) you should post a picture next time, HOW it should look... well, now you ll have your LinearLayout divided into two similar wide part (red & green), and in every block your checkbox is in the center...did i got it right this time?!
Just add this to your LinearLayout :
android:gravity="center_horizontal"
This line specifies that anything inside this layout will be in the center.
The Full layout code :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal">
<CheckBox
android:id="#+id/cb1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox ONE"
/>
<CheckBox
android:id="#+id/cb2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox TWO" />
</LinearLayout>
Here is the output i got :
I'm using android:layout_below & android:layout_above on a RelativeLayout which contains (com.test.richedit.RichTextEditor) to attempt to always render it above my bottom RelativeLayout: (com.test.SetCancelButtons) & always below my LinearLayout (com.test.MenuBarTopNote) . However when I do this the com.test.richedit.RichTextEditor doesn't show up at all. I have also tried just using android:layout_below="#+id/menu_bar_top" and not specifying a android:layout_above, however, when typing many lines of text the EditText grows to the pont where is goes behind the bottom footer bar (com.test.SetCancelButtons). I essentially want the Edit Text to always be the same size stretched between the top header bar and bottom footer bar and just the content to be scrollable
The com.test.richedit.RichTextEditor is essentially a LinearLayout containing some buttons for styling the text in an EdiText below it.
I have used android:layout_below & android:layout_above together before on a ListView and it worked fine, how can I achieve the same result in this case?
The xml where I'm trying to center com.test.richedit.RichTextEditor above and below 2 views:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/llayNote"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="#drawable/bkgrd_event_new">
<com.test.StatusBar
android:id="#+id/statusbar"
android:layout_width="fill_parent"
android:layout_height="49dip"
android:paddingTop="0dip"
android:background="#drawable/statusbar"
/>
<com.test.MenuBarTopNote
android:id="#+id/menu_bar_top"
android:layout_below="#+id/statusbar"
android:layout_width="fill_parent"
android:layout_height="104dip"
android:background="#drawable/menu_bar_top1"
/>
<!-- EDIT SUBJECT -->
<RelativeLayout
android:layout_below="#+id/menu_bar_top"
android:layout_above="#+id/setcancelbuttons"
android:layout_marginLeft="8dip"
android:layout_marginTop="10dip"
android:layout_marginRight="8dip"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.test.richedit.RichTextEditor
android:id="#+id/edNoteSubject"
android:layout_width="wrap_content" android:layout_height="wrap_content"
/>
</RelativeLayout>
<com.test.SetCancelButtons
android:layout_alignParentBottom="true"
android:id="#+id/setcancelbuttons"
android:layout_width="wrap_content"
android:layout_marginTop="20dip"
android:layout_height="wrap_content" />
</RelativeLayout>
The com.test.richedit.RichTextEditor:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dip"
>
<LinearLayout android:id="#+id/toolbar"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="2dip"
>
<ToggleButton
android:id="#+id/bold"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textOn="B"
android:textOff="B"
android:textColor="#464646" />
<ToggleButton
android:id="#+id/italic"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textOn="I"
android:textOff="I"
android:textColor="#464646" />
<ToggleButton
android:id="#+id/underline"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textOn="U"
android:textOff="U"
android:textColor="#464646" />
<Button
android:id="#+id/size"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text=" SIZE "
android:textColor="#000000" />
<Button
android:id="#+id/color"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text=" COLOR "
android:textColor="#000000" />
<Button
android:id="#+id/link"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text=" LINK "
android:textColor="#464646" />
<ToggleButton
android:id="#+id/html"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textOn=" HTML "
android:textOff=" HTML "
android:textColor="#464646" />
<!--
<ToggleButton
android:id="#+id/strike"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#id/underline"
android:layout_toRightOf="#id/underline"
android:textSize="17dip"
android:textOn="#string/strike"
android:textOff="#string/strike"
android:textColor="#464646" />
<Button
android:id="#+id/link"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#id/strike"
android:layout_toRightOf="#id/strike"
android:textSize="17dip"
android:textColor="#21759b"
android:text="#string/link" />
<ToggleButton
android:id="#+id/bquote"
android:background="#drawable/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#id/link"
android:layout_toRightOf="#id/link"
android:textSize="17dip"
android:textOn="b-quote"
android:textOff="b-quote"
android:textColor="#464646" />
-->
</LinearLayout>
<EditText android:id="#+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical"
android:gravity="top"
android:minLines="1"
android:textColorLink="#21759b" />
<!-- android:autoText="true" -->
</LinearLayout>
I'm not good in xml layout in android, but why don't you try putting "fill_parent" on both width and height of the richtexteditor and also add weight set to 1 to make sure the the object will fill all the remaining space on the view so it will look like this:
<com.test.richedit.RichTextEditor
android:id="#+id/edNoteSubject"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
hope this will help you.
Try moving the setCancelButton above the RichTextEditor view within the layout. Also set RichTextEditor layout's width and height to fill_parent