TextView ellipsize not work inside RelativeLayout - android

I can't understand why my textview is not ellipsized. Thank you for any help.
I have this layout:
<?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="65dp"
android:background="#drawable/dash_whiteplate"
android:minHeight="#dimen/info_activity_list_item_height"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:weightSum="1.0" >
<RelativeLayout style="#style/ItemFlightRouteLayout" >
<ImageView
android:id="#+id/routImageTop"
style="#style/ItemFlightRouteArrow"
android:src="#drawable/icon_arrowup_normal" />
<TextView
android:id="#+id/routAiroportFrom"
style="#style/ItemFlightRouteAirportName"
android:layout_toLeftOf="#+id/topDescription"
android:layout_toRightOf="#+id/routImageTop"
android:textAppearance="#style/ItemFlightRouteAirportName"
android:text="askdjflsfksdfasdfdfsfdsfsdfsfdsdfsfd" />
<RelativeLayout
android:id="#+id/topDescription"
style="#style/ItemFlightRouteDescriptionLayout" >
<View
android:id="#+id/verticalDivider"
style="#style/ItemFlightRouteSeparator"
android:layout_toLeftOf="#+id/txt_time" />
<RelativeLayout
android:id="#+id/txt_time"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_toLeftOf="#+id/verticalDivider2" >
<TextView
android:id="#+id/timeDep"
style="#style/ItemFlightRouteText"
android:textColor="#color/statusLanded" />
</RelativeLayout>
<View
android:id="#+id/verticalDivider2"
style="#style/ItemFlightRouteSeparator"
android:layout_toLeftOf="#+id/txt_gate" />
<RelativeLayout
android:id="#+id/txt_gate"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true" >
<TextView
android:id="#+id/desciptionTop"
style="#style/ItemFlightRouteText" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#color/grey" />
<RelativeLayout style="#style/ItemFlightRouteLayout" >
<ImageView
android:id="#+id/routImageBottom"
style="#style/ItemFlightRouteArrow"
android:src="#drawable/icon_arrowdown_normal" />
<TextView
android:id="#+id/routAiroportTo"
style="#style/ItemFlightRouteAirportName"
android:layout_toLeftOf="#+id/bottomDescription"
android:layout_toRightOf="#+id/routImageBottom"
android:textAppearance="#style/ItemFlightRouteAirportName" />
<RelativeLayout
android:id="#+id/bottomDescription"
style="#style/ItemFlightRouteDescriptionLayout" >
<View
android:id="#+id/verticalDivider3"
style="#style/ItemFlightRouteSeparator"
android:layout_toLeftOf="#+id/txt_time2" />
<RelativeLayout
android:id="#+id/txt_time2"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_toLeftOf="#+id/verticalDivider4" >
<TextView
android:id="#+id/timeArr"
style="#style/ItemFlightRouteText" />
</RelativeLayout>
<View
android:id="#+id/verticalDivider4"
style="#style/ItemFlightRouteSeparator"
android:layout_toLeftOf="#+id/txt_gate2" />
<RelativeLayout
android:id="#+id/txt_gate2"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true" >
<TextView
android:id="#+id/desciptionBottom"
style="#style/ItemFlightRouteText" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
and styles:
<style name="ItemFlightRouteLayout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">0.5</item>
<item name="android:weightSum">1.0</item>
</style>
<style name="ItemFlightRouteArrow">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_alignParentLeft">true</item>
<item name="android:layout_centerInParent">true</item>
<item name="android:layout_marginLeft">5dp</item>
</style>
<style name="ItemFlightRouteAirportName">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:layout_margin">5dp</item>
<item name="android:ellipsize">marquee</item>
<item name="android:padding">2dp</item>
<item name="android:singleLine">true</item>
<item name="android:textColor">#android:color/black</item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">14sp</item>
</style>
<style name="ItemFlightRouteDescriptionLayout">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_alignParentRight">true</item>
<item name="android:layout_gravity">right</item>
</style>
<style name="ItemFlightRouteSeparator">
<item name="android:layout_width">1dp</item>
<item name="android:layout_height">22dp</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:layout_marginBottom">5dp</item>
<item name="android:layout_marginTop">5dp</item>
<item name="android:background">#color/grey</item>
</style>
<style name="ItemFlightRouteText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:layout_margin">5dp</item>
<item name="android:gravity">center</item>
</style>

Finally I've got it!
What I've done: moved routImageTop and routAiroportFrom to LinearLayout, aligned it at parent left and set android:layout_toLeftOf="#+id/topDescription"
Now it works.

Add in your Xml
<item name="android:marqueeRepeatLimit">marquee_forever</item>
in Activity
your_textview.setSelected(true);
your_textview.setSingleLine(true);
your_textview.setEllipsize(TruncateAt.MARQUEE);
I think you can put these values in Xml too...
Hope this help

The TextView needs focus to make the marquee scroll in a TextView. Have you tried using either selected_state, requestFocus, or setSelected to set focus to the TextView?
Make a Scrolling Marquee, using scrollHorizontally, in a TextView
Deprecated: Make a Scrolling Marquee, using singleLine, in a TextView

Related

I need change the color to border of the check box,Because it is in white color

I have check box in my contacts list to select that. But check box is in white color,it is not visible...So i need to change that border to black color...Please help me to change the code
This is my layout code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="?android:dividerVertical"
android:showDividers="middle"
android:dividerPadding="5dp"
tools:context=".MainActivity" >
<ImageButton
android:id="#+id/image"
android:layout_width="#dimen/contact_image"
android:layout_height="50dp"
android:src="#drawable/contacts_image" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:clickable="false"
android:focusable="true"
android:orientation="vertical" >
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="0dp"
android:paddingTop="1dp"
android:textColor="#color/black"
android:textSize="18sp"
/>
<TextView
android:id="#+id/mobile_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/black"
android:textSize="15sp"
android:paddingLeft="5dp"
android:paddingRight="0dp"
/>
</LinearLayout>
<CheckBox
android:id="#+id/check_box"
android:layout_width="#dimen/check_box_width"
android:layout_height="50dp"
android:visibility="visible"
android:clickable="true"/>
</LinearLayout>
This is my style.xml code
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="actionBarStyle">#style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="#style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">#color/scandal</item>
<item name="titleTextStyle">#style/MyActionBarTitleText</item>
</style>
<style name="MyActionBarTitleText" parent="#style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
</style>
<style name="ActionBarCompat">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">50dp</item>
<item name="android:orientation">horizontal</item>
</style>
<style name="DashboardButton">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:drawablePadding">2dp</item>
<item name="android:textSize">16dp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">#ff29549f</item>
<item name="android:background">#null</item>
</style>
<style name="FooterBar">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">40dp</item>
<item name="android:orientation">horizontal</item>
<item name="android:background">#dedede</item>
</style>
<style name="Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">?android:attr/listDivider</item>
</style>
</resources>
instead changing the default in style xml file. do this.
create this your_custom.xml file and and save it in drawable folder
your_custom.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/unselected" android:state_checked="false"><color android:textColor="#your_color" />
</item>
<item android:drawable="#drawable/selected" android:state_checked="true"><color android:textColor="#your_color" />
</item>
<item android:drawable="#drawable/uncheck"></item>
<!-- default -->
</selector>
you will have to create three images for checkbox display
1.selected
2.unselect
3.uncheck
after all this done set attribute to your checkbox in layout
android:button="#drawable/your_custom"

how to align controls in android linear layout

I am using android studio to design a dashboard. Now I am facing the issue that I have a linear layout where I want 2 buttons in each row, with one button on the left and other at right of the screen. My xml is like this:
<LinearLayout style="#style/ActivityBody"
android:orientation="vertical"
>
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dip"
android:layout_gravity="left"
android:layout_marginLeft="20dp"
>
<Button
android:id="#+id/btnMaterialIssue"
style="#style/DashboardButton"
android:drawableTop="#drawable/materialissue"
android:text="Material Issue"
android:onClick="onGol"
android:layout_gravity="left"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="#+id/btnWorkCompletion"
style="#style/DashboardButton"
android:drawableTop="#drawable/workcompletion"
android:text="Work Completion"
android:onClick="onGol"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
My style file is like this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<style name="Theme" parent="android:Theme"></style>
<style name="Theme.D1t" parent="android:style/Theme.Light">
<item name="android:windowNoTitle">false</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="Theme.D1" parent="android:style/Theme.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="Theme.tranlucent" parent="android:style/Theme.Translucent">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="Home">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">0</item>
<item name="android:background">#fff</item>
</style>
<style name="HomeText">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">0</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:textSize"> 18sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">#color/foreground</item>
</style>
<style name="TitleBar">
<item name="android:id">#id/title_container</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">45dip</item>
<item name="android:orientation">horizontal</item>
<item name="android:background">#color/title_background</item>
</style>
<style name="TitleBarOperation">
<item name="android:layout_width">45dip</item>
<item name="android:layout_height">fill_parent</item>
</style>
<style name="TitleBarLogo">
<item name="android:id">#id/title_logo</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">fill_parent</item>
</style>
<style name="TitleBarText">
<item name="android:id">#id/title_text</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:gravity">center_vertical</item>
<item name="android:textSize">18sp</item>
<item name="android:paddingLeft">12dip</item>
<item name="android:paddingRight">12dip</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">#color/title_text</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
</style>
<style name="TextBody">
<item name="android:textSize">15sp</item>
<item name="android:lineSpacingMultiplier">1.1</item>
<item name="android:textColor">#color/textBody</item>
<item name="android:textStyle">bold</item>
</style>
<style name="ActivityBody">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="DashboardButton">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:drawablePadding">2dp</item>
<item name="android:textSize">9dp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">#fff</item>
<item name="android:background">#null</item>
</style>
</resources
you have to use android:layout_weight
to use layout_weight you want to set layout_width as "0dp"
android:layout_width="0dp"
android:layout_weight="1"
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dip"
android:layout_gravity="left"
android:layout_marginLeft="20dp"
>
<Button
android:id="#+id/btnMaterialIssue"
style="#style/DashboardButton"
android:drawableTop="#drawable/materialissue"
android:text="Material Issue"
android:onClick="onGol"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" />
<Button
android:id="#+id/btnWorkCompletion"
style="#style/DashboardButton"
android:drawableTop="#drawable/workcompletion"
android:text="Work Completion"
android:onClick="onGol"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" />
</LinearLayout>
what you can do is to use the relative layout and align them to left and right
below is the code
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="60dip"
android:layout_gravity="left"
android:layout_marginLeft="20dp">
<Button
android:id="#+id/btnMaterialIssue"
style="#style/DashboardButton"
android:drawableTop="#drawable/materialissue"
android:text="Material Issue"
android:onClick="onGol"
android:layout_alignParentRight="true"
android:layout_gravity="left"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="#+id/btnWorkCompletion"
android:layout_alignParentLeft="true"
style="#style/DashboardButton"
android:drawableTop="#drawable/workcompletion"
android:text="Work Completion"
android:onClick="onGol"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
Option:
Use margins to the left of right button and to the right of the left button.
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dip"
android:layout_gravity="left"
android:layout_marginLeft="20dp"
>
<Button
android:id="#+id/btnMaterialIssue"
style="#style/DashboardButton"
android:drawableTop="#drawable/materialissue"
android:text="Material Issue"
android:onClick="onGol"
layout_marginRight="20dp"
android:layout_gravity="left"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="#+id/btnWorkCompletion"
style="#style/DashboardButton"
android:drawableTop="#drawable/workcompletion"
android:text="Work Completion"
android:onClick="onGol"
layout_marginLeft="20dp"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Option:
place something (another view (Linearlayout)) in the middle, between the buttons.
Option:
Try to play with layout_weight
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="New Button"
android:layout_weight="1"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_weight="1">
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="New Button"
android:layout_weight="1"/>
</LinearLayout>
Add all linearlayout in relativelayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:orientation="horizontal" >
And in linearlayout or button add android:layout_alignParentRight="true"
<Button
android:id="#+id/btnAddExpense"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="15dp"
android:background="#drawable/stitch_button"
android:text="#string/add" />

No style applied using AndroidImageSlider

I'm using AndroidImageSlider (https://github.com/daimajia/AndroidImageSlider) in my app but I cant apply custom design in the page indicator. I'm using Eclipse, I download the proyect and add as a library
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="#+id/viewFlipper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:addStatesFromChildren="true"
android:background="#color/azul_us"
android:orientation="vertical" >
<com.daimajia.slider.library.SliderLayout
android:id="#+id/slider"
android:layout_width="match_parent"
android:layout_height="200dp" />
<com.daimajia.slider.library.Indicators.PagerIndicator
android:id="#+id/custom_indicator"
style="#style/AndroidImageSlider_Magnifier_Oval_Black" />
</LinearLayout>
<style name="AndroidImageSlider_Magnifier_Oval_Black">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">right</item>
<item name="android:paddingLeft">2dp</item>
<item name="android:paddingRight">2dp</item>
<item name="shape">rect</item>
<item name="padding_left">3dp</item>
<item name="padding_right">3dp</item>
<item name="padding_top">4dp</item>
<item name="padding_bottom">4dp</item>
<item name="selected_color">#7ac943</item>
<item name="unselected_color">#33000000</item>
<item name="selected_width">8dp</item>
<item name="selected_height">8dp</item>
<item name="unselected_width">6dp</item>
<item name="unselected_height">6dp</item>
</style>
Thanks!!!!!
I forgot add this line
slider.setCustomIndicator((PagerIndicator) findViewById(R.id.custom_indicator));

Layout weight is not fit, it change every input

I have a spinner, an edittext and a button in a horizontal linearlayout. When I have enter something into edittext, it increase every character and others decrease. There is an eanough blank area input but it does not change, every time it increase how long character I input.
How can I fix it?
layout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="#dimen/ly"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="10" >
<Spinner
android:id="#+id/spinner1"
style="#style/submitspinner"
android:layout_weight="2"
android:entries="#array/a_code"
android:prompt="#string/p_code" />
<EditText
android:id="#+id/editText1"
style="#style/submitstyle"
android:layout_weight="5"
android:inputType="number" >
<requestFocus />
</EditText>
<Button
android:id="#+id/button1"
style="#style/submitstyle"
android:layout_weight="3"
android:text="#string/btn_submit" />
</LinearLayout>
style
<style name="submitstyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_margin">10sp</item>
<item name="android:textColor">#android:color/holo_blue_dark</item>
<item name="android:textSize">#dimen/pt</item>
</style>
<style name="submitspinner" parent="#android:TextAppearance.Widget.TextView.SpinnerItem">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_margin">10sp</item>
<item name="android:textColor">#android:color/holo_blue_dark</item>
<item name="android:textSize">#dimen/pt</item>
</style>
I have changed style as below and it worked well...
submitstyle and submitspinner style
from
<item name="android:layout_width">wrap_content</item>
to
<item name="android:layout_width">0dp</item>
I found good tuts for this but I have closed the tab, I cannot share it...
//change you style from
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
//to
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>

How to hide Title in `Theme.Sherlock.Dialog`?

My DialogActivities extends from SherlockFragmentActivity. So I must to use Sherlock themes.
In values-v14 I hide Title like this:
<style name="Theme.Sherlock.Dialog" parent="#android:style/Theme.Holo.Dialog">
<item name="android:windowNoTitle">true</item>
</style>
How to hide Title in Theme.Sherlock.Dialog in values folder?
By default it looks like this (github.com):
<style name="Theme.Sherlock.Dialog" parent="android:Theme">
<item name="android:windowFrame">#null</item>
<item name="android:windowTitleStyle">#style/DialogWindowTitle.Sherlock</item>
<item name="android:windowBackground">#drawable/abs__dialog_full_holo_dark</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowAnimationStyle">#android:style/Animation.Dialog</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowActionModeOverlay">true</item>
<item name="android:windowCloseOnTouchOutside">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimAmount">0.6</item>
<item name="android:colorBackgroundCacheHint">#null</item>
<item name="android:textColorPrimary">#color/abs__primary_text_holo_dark</item>
<item name="android:textColorPrimaryInverse">#color/abs__primary_text_holo_light</item>
<item name="windowMinWidthMajor">#dimen/abs__dialog_min_width_major</item>
<item name="windowMinWidthMinor">#dimen/abs__dialog_min_width_minor</item>
<item name="windowActionBar">false</item>
<item name="windowContentOverlay">#null</item>
</style>
Solution:
I've changed abs__dialog_title_holo.xml by adding two lines in: https://github.com/JakeWharton/ActionBarSherlock/blob/master/library/res/layout/abs__dialog_title_holo.xml
<com.actionbarsherlock.internal.widget.FakeDialogPhoneWindow xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:fitsSystemWindows="true">
<TextView android:id="#android:id/title" style="?android:attr/windowTitleStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="#dimen/abs__alert_dialog_title_height"
android:visibility="gone" //******** FIRST ********
android:paddingLeft="16dip"
android:paddingRight="16dip"
android:gravity="center_vertical|left" />
<View android:id="#+id/abs__titleDivider"
android:layout_width="fill_parent"
android:visibility="gone" //******** SECOND ********
android:layout_height="2dip"
android:background="#color/abs__holo_blue_light" />
<FrameLayout
android:layout_width="match_parent" android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:foreground="?attr/windowContentOverlay">
<FrameLayout android:id="#+id/abs__content"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>

Categories

Resources