Search Results

Search found 2001 results on 81 pages for 'wrap'.

Page 4/81 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Scale background image to wrap content of layout

    - by bjg222
    I have a layout that contains some text fields and has a background image that's displayed at the top of my activity. I'd like the background image to scale to wrap the content (don't care about aspect ratio). However, the image is larger than content, so the layout instead wraps the background image. Here's my original code: <RelativeLayout android:layout_width="fill_parent" android:id="@+id/HeaderList" android:layout_gravity="top" android:layout_height="wrap_content" android:background="@drawable/header"> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/NameText" android:text="Jhn Doe" android:textColor="#FFFFFF" android:textSize="30sp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:paddingLeft="4dp" android:paddingTop="4dp" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="#FFFFFF" android:layout_alignParentLeft="true" android:id="@+id/HoursText" android:text="170 hours" android:textSize="23sp" android:layout_below="@+id/NameText" android:paddingLeft="4dp" /> </RelativeLayout> After searching through some other questions, I found these two: How to wrap content views rather than background drawable? Scale a Drawable or background image? Based on this, I created a FrameLayout w/ an ImageView showing the background. Unfortunately, I still can't get it to work. I want the height of the background image to shrink/expand w/ the size of the text views, but with the FrameLayout, the ImageView fits to the size of it's parent, and I can't find a way to make the parent fit to the size the text view layout. Here's my updated code: <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > <ImageView android:src="@drawable/header" android:layout_width="fill_parent" android:scaleType="fitXY" android:layout_height="fill_parent" /> <RelativeLayout android:layout_width="fill_parent" android:id="@+id/HeaderList" android:layout_gravity="top" android:layout_height="wrap_content" > <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/NameText" android:text="John Doe" android:textColor="#FFFFFF" android:textSize="30sp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:paddingLeft="4dp" android:paddingTop="4dp" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="#FFFFFF" android:layout_alignParentLeft="true" android:id="@+id/HoursText" android:text="170 hours" android:textSize="23sp" android:layout_below="@+id/NameText" android:paddingLeft="4dp" /> </RelativeLayout> </FrameLayout> Does anybody have any suggestions for how best to make an image scale to the size of the contents of some layout? I'm not concerned with the aspect ratio of the image, as it won't matter, I just want it to fill the background. Thanks!

    Read the article

  • JCarousel wrap set to 'circular' bug

    - by Scott
    I'm trying to set up a JCarousel instance witht the wrap set to circular, however, I noticed an issue where I "inspect element" in Chrome, duplicate elements are added to the html when the slides repeat (it can be viewed on the official example page). http://sorgalla.com/projects/jcarousel/examples/static_circular.html I know this is an open bug on GitHub. I'm just wondering if anyone has found a temporary workaround. Thanks in advance, - Scott

    Read the article

  • Wrap output of struts2 ServletDispatcherResult ?

    - by krosenvold
    I'd like to do much the same thing as the Struts2 sitemesh servlet-filter does, i.e. wrap the output of an action with some chosen content. The "problem" with the sitemesh approach is that it AFIK it does not have any relationship to the ActionInvocation, and I would like to be able to query information from the ActionInvocation when determining which content to add. I have looked through the ServletDispatcherResult, and I'm not entirly sure what's the best way to achieve this. Any suggestions ?

    Read the article

  • Checking For Word Wrap In Table Column

    - by Sparafusile
    I'm writing part of a web page that allows a user to build a table and fill it with information. In the course of building the table, the user will be adding additional columns with headers. I'd like to code it so when the combined width of all the headers causes one of them to wrap that the table columns switch to using vertical text (writing-mode: tb-rl). Is there any way, using JavaScript, to determine if the contents of a specific cell have wrapped? Thanks, Spara

    Read the article

  • Horizontal(tabbed) menu with ability to wrap overflowed items into collapsible dropdown

    - by wik
    It's about html/css/javascript menu ;) I am looking for unified solution to hide extra tabs of horizontal/tabbed menu when it overflows it's container. The initial idea plagiarized from firefox tabs workflow, i.e. when you have too much tabs it will wrap extra ones into collapsible dropdown button "List all tabs". I am thinking to play with overflow:auto in conjunction with javascript, but is there anything like this already implemented or maybe some better idea? Thanks.

    Read the article

  • Word Wrap in Net Beans

    - by Java guy
    I'm just learning to code in java. Netbeans is great but I just found there's no way to wrap text in it (or hopefully I haven't found it yet). Is there any way to do this, and if not, is there any similarly good IDE for Java with this functionality (hopefully free as well). Thanks.

    Read the article

  • jQuery plugin to wrap text around images + support IE6

    - by Alex
    This is a tall order, but is there a jQuery or Mootools (or other framework) plugin to wrap text around images and support IE6? I've tried the jQSlickWrap, but unless the browser supports HTML 5, you're out of luck. What's strange is that IE 6 supports the jQuery Background Canvas plugin, which uses the CANVAS object (via excanvas.js) just as this plugin does. Thanks.

    Read the article

  • Does Eclipse have line-wrap

    - by donpal
    I'm editing an XML file with the Eclipse IDE and need to input paragraphs of text. It doesn't seem that eclipse has a line-wrap feature though. Anyone knows if it does or if there's a plugin for that?

    Read the article

  • Wrapper Dll to wrap an application

    - by sijith
    Hi, Want to wrap the original exe to produce new exe. This new exe works with it's original functionality, no limitation but the outer part controls the trial situation. Is it possible to do with VC++ Please give some valuable help

    Read the article

  • How to get DIVs into this code via JQuery

    - by ludz
    Heya everyone I been struggling along with this piece of code for the longest time, its driving me insane. I am trying many different things and looking at past posts here but nothing seems to be helping. Basicly i have a jquery pagination code in place and i want to add animated transitions between pages. With some assistance i got that working correctly however this causes the page to jump around as the new items fade in and out. To fix this i need a DIV wrapped around each selection of results. I have been trying to use .wrap .html .wrapinner .append and i cant get any of it to work properly. The 2 areas where i beleive the code needs to be place are as follows: $('#content').children().slice(0, show_per_page).css('display', 'block'); and $('#content').children().fadeOut('slow').slice(start_from, end_on).fadeIn('slow'); Full original code: http://tutsvalley.com/tutorials/making-a-jquery-pagination-system/ Only the second line of code posted here has been altered. Basicly i want to wrap each group of sliced output in a DIV. I hope that makes sense, if you need anymore information please let me know. Any ideas or suggestions on what to try it would be much apreciated as its currently driving me crazy :) Ludz~

    Read the article

  • UILabel text doesn't word wrap

    - by iFloh
    Hi, I have a long text string (including \n newline charactersthat I feed into a UILabel for display. The UILabel is dynamically setup to provide sufficient space foor the text. My code looks like this: myText = [NSString stringWithFormat:@"%@some text: %@ \n \n %@", myText, moreText1, moreText2]; NSLog(@"%@", myText); myLabelSize = [vLabelText sizeWithFont:[UIFont fontWithName:@"Helvetica" size:(15.0)] constrainedToSize:cMaxLabelSize lineBreakMode:UILineBreakModeWordWrap]; UILabel *lBody = [[UILabel alloc] initWithFrame:CGRectMake(cFromLeft, vFromTop, vLabelSize.width, vLabelSize.height)]; lBody.font = [UIFont fontWithName:@"Helvetica" size:(15.0)]; lBody.lineBreakMode = UILineBreakModeWordWrap; lBody.textAlignment = UITextAlignmentLeft; lBody.backgroundColor = [UIColor cyanColor]; [myScrollView addSubview:lBody]; lBody.text = vLabelText; My problem is that the text does not wrap, but truncates after the first line. The \n newlines are ignored. any ideas?

    Read the article

  • HTML5 text wrap

    - by Gwood
    I am trying to add text on an image using the html5 canvas. First the image is drawn and on the image the text is drawn. So far so good. But where i am facing prob is that if the text is too long it gets cut off in the start and end by the canvas. I dont hav eplan to resize the canvas but I was wondering how to wrap the long text into multiple lines so that all of it gets displayed. Can anyone point me at the right direction?

    Read the article

  • Wrap text around an image in rails and prawn

    - by stevenheidel
    I have a document with dynamic image and dynamic text and would like the text around the image. The image is right aligned on the landscape page. Here is what I have so far: pdf.bounding_box([0,pdf.bounds.top - 50], :width => pdf.bounds.width, :height => pdf.bounds.height-50) do pdf.text @article.title, :size => 30, :style => :bold pdf.text @article.content, :align => :left # image pdf.bounding_box([pdf.bounds.right - 250, pdf.bounds.top], :width => 250, :height => 250) do pdf.image image_path, :width => 250 end end The text goes right underneath the image. I tried doing this http://stackoverflow.com/questions/2085151/ruby-prawn-how-to-wrap-text-around-an-aligned-right-image but it didn't work. Help is appreciated, thanks.

    Read the article

  • how to word wrap a QTreeWidgetItem

    - by japs
    hello all, i have to populate a QTreeWidget with items (or children of items) that may happen to be too long to fit in a single line, so i'm looking for a way to word wrap them. i thought myQTreeWidget.setWordWrap(True) (done via QtDesigner4) would have done the job, but that doesn't seem to be the case. i don't konw if it is relevant, but the tree is enveloped in a splitter frame, so the wrapping should be somehow dynamic to allow resizing of the splitter. Any ideas? I use PyQt4, but hints in any language/binding would be much appreciated. have a good day all.

    Read the article

  • Wrap link around links in tweets with php preg_replace

    - by Ben Paton
    Hello I'm trying to display the latest tweet using the code below. This preg_replace works great for wrapping a link round twitter @usernames but doesn't work for web addresses in tweets. How do I get this code to wrap links around urls in tweets. <?php /** Script to pull in the latest tweet */ $username='fairgroceruk'; $format = 'json'; $tweet = json_decode(file_get_contents("http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}")); $latestTweet = htmlentities($tweet[0]->text, ENT_QUOTES); $latestTweet = preg_replace('/@([a-z0-9_]+)/i', '<a href="http://twitter.com/$1" target="_blank">@$1</a>', $latestTweet); $latestTweet = preg_replace('/http://([a-z0-9_]+)/i', '<a href="http://$1" target="_blank">http://$1</a>', $latestTweet); echo $latestTweet; ?> Thanks for the help, Ben

    Read the article

  • Wrap text around a right-aligned icon?

    - by user246114
    Hi, Is it possible to make a small box (which will be a row element in a list for me) with an icon in the upper right corner, and text wrapped around it? Something like: ------------------------------------------------- | Some text here which may wrap around [icon] | | if it were to get too long, but then fit well | | around the icon in the upper right corner? | ------------------------------------------------- I was going to use this as a row in a list, and the user could click the icon in the upper-right to delete the row. I could use either a <div> or a <table>, I'm not sure which will be better?: <div> <p>The text</p> <img src="close.png" align="upper-right"> </div> Thanks

    Read the article

  • Forcing images to not wrap

    - by Mohammad
    I can't touch the html theme but I have access to the css files. <div class="photos"> <img src="a.jpg" alt="" align="left" /> <img src="b.jpg" alt="" align="left" /> <img src="c.jpg" alt="" align="left" /> //align makes the images wrap </div> Unfortunately I can't remove align="left" from the images otherwise this CSS snippet would have done the job .photos{ white-space: nowrap; } .photos img{ display: inline; vertical-align: top; } Any ideas? Is it even possible to make these images line-up horizontally without using the force of a table and only with CSS? Many Thank in advance!

    Read the article

  • What simple methods are there to wrap a c++ based object model with a COM interface

    - by Rich
    I have a pre-existing c++ object model which represents the business layer tier of an application. I want to be able to expose the object model to applications written in other languages i.e vbscript, VB, javascript etc. I believe the best way of doing this is to wrap the business objects with a COM layer. What fast and effective methods are there for doing this. Any advice, links to practical "How to" documentation would be very much appreciated. Because I'm starting a bounty on this , here's a few extra guidelines for potential bounty hunters :- 1)I've decided on an ATL approach 2)I'm now specifically looking for links to really good "how to and quickly" documentation on wrapping a pre-existing c++ object model to make it useable by a scripting language like javascript 3) Something with small working examples showing me what code needs to be added to what files, e.g what goes into the cpp , idl and hpp/h etc. It' must include an example I can compile test and change to get a better understanding.

    Read the article

  • Haskell: variant of `show` that doesn't wrap String and Char in quotes

    - by Joey Adams
    I'd like a variant of show (let's call it label) that acts just like show, except that it doesn't wrap Strings in " " or Chars in ' '. Examples: > label 5 "5" > label "hello" "hello" > label 'c' "c" I tried implementing this manually, but I ran into some walls. Here is what I tried: {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module Label where class (Show a) => Label a where label :: a -> String instance Label [Char] where label str = str instance Label Char where label c = [c] -- Default case instance Show a => Label a where label x = show x However, because the default case's class overlaps instance Label [Char] and instance Label Char, those types don't work with the label function. Is there a library function that provides this functionality? If not, is there a workaround to get the above code to work?

    Read the article

  • Good way to "wrap" jars for OSGi with Maven

    - by javamonkey79
    I was looking at the PAX tools on OPS4J for example: this one and I thought I'd found a nice way to: Specify an artifact Create an assembled jar (jar that contains all dependencies) from that jar and it's transitive dependencies Wrap it with BND to create an OSGi bundle It turns out, that I was wrong - it doesn't appear that the PAX stuff does this. (RTFM, right? :) ) But this got me wondering: is there something out there that does what I'm asking? I've thought maybe I could do this by creating a simple POM and using the maven-bundle-plugin but this seems like it might be a bit cumbersome for what I'm asking. NOTE: I get that embedding and assembling jar's is not really "the OSGi way" - so I wouldn't do this unless I really felt it useful. For example - Spring. Thanks in advance.

    Read the article

  • Wrap words in tags, keep markup

    - by spacevillain
    For example I have a string with markup (from html node): hello, this is dog "h<em>e<strong>llo, thi</strong>s i</em><strong>s d</strong>og" What is the most correct way to find some words in it (let's say "hello" and "dog"), wrap them in a span (make a highlight) and save all the markup? Desired output is something like this (notice properly closed tags) <span class="highlight">h<em>e<strong>llo</strong></em></span><strong>,</strong> <em><strong>thi</strong>s<em> i</em><strong>s <span class="highlight"><strong>d</strong>og</span> Looks the same as it should: hello, this is dog

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >