Select to view content in your preferred language

Callout size problem

2785
3
Jump to solution
04-10-2013 01:51 AM
cadgism
Regular Contributor
The call out I am showing to display an attribute value of a point  feature does not show its full length. Please see the attachments. Can some one help please!!.

identify_callout_content.xml

<?xml version="1.0" encoding="utf-8"?> <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:orientation="horizontal"     android:layout_height="fill_parent" >      <TextView       android:id="@+id/landMark"       android:layout_height="wrap_content"       android:layout_width="fill_parent"       android:gravity="center"        android:textSize="15sp"       android:textStyle="bold"       android:textColor="@color/bgrfont"       android:typeface="normal"/>   </LinearLayout>


identify_calloutstyle.xml

<?xml version="1.0" encoding="utf-8"?> <resources>     <calloutViewStyle         anchor="9dip"         backgroundColor="#7F0A0A0A"         flat="true"         cornerCurve="10"           frameColor="#FFC7C7C7"         maxWidth="100"/> </resources>


 m_calloutStyle = R.xml.identify_calloutstyle; LayoutInflater inflater = getLayoutInflater(); m_callout = map.getCallout(); ViewGroup calloutContent = (ViewGroup) inflater.inflate(R.layout.identify_callout_content, null); m_callout.setContent(calloutContent);   private void ShowCallout(Callout calloutView, Graphic graphic,Point mapPoint) {    String lmarkName = (String) graphic.getAttributeValue("NAME");     calloutView.setStyle(m_calloutStyle);  calloutView.setCoordinates(mapPoint);  calloutView.getStyle().setMaxHeight(50);  calloutView.getStyle().setMaxWidth(100);     TextView calloutTextLine1 = (TextView) findViewById(R.id.landMark);  calloutTextLine1.setText(lmarkName);      calloutView.setContent(calloutContent);  calloutView.refresh();  calloutView.show(); }
0 Kudos
1 Solution

Accepted Solutions
cadgism
Regular Contributor
Did you try cranking up your callout's max width/height values?  say something like:

Also, I don't know if you need to call getStyle();

calloutView.setMaxWidth(300);
calloutView.setMaxHeight(200);


Oh yes i did. It didn't work!!!.  I replaced call out with an alert dialogue.
Thank you.

View solution in original post

0 Kudos
3 Replies
deleted-user-ATjHIWsdQYmT
Deactivated User
Did you try cranking up your callout's max width/height values?  say something like:

Also, I don't know if you need to call getStyle();

calloutView.setMaxWidth(300);
calloutView.setMaxHeight(200);
0 Kudos
cadgism
Regular Contributor
Did you try cranking up your callout's max width/height values?  say something like:

Also, I don't know if you need to call getStyle();

calloutView.setMaxWidth(300);
calloutView.setMaxHeight(200);


Oh yes i did. It didn't work!!!.  I replaced call out with an alert dialogue.
Thank you.
0 Kudos
MáximoMussini
Emerging Contributor
I have the same problem. Tried setting the max height and width but the callout still crops my custom view.
Is there a way to make it larger?
0 Kudos