Search Results

Search found 935 results on 38 pages for 'landscape portrait'.

Page 31/38 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • problem in printing fonts

    - by user1400
    hello i have a application on php that i show a report in the table , i want to print this page i can see my page fine in print preview , but when i send thuis page to printer ,the fonts are small and diffrent fonts that i set in css file this is my css file @page { size: A4 landscape; margin-top:2cm; margin-bottom:1cm; margin-left:1cm; margin-right:1cm; } table.print{ text-align:right; border:#999 1px solid; } table.print td.e1{ border-top:#999 1px solid; padding:5px 2px; text-align: right; font-size: 20pt; font-family:"stencil"; } table.print td.e2{ border-top:#999 1px solid; padding:5px 2px; text-align: right; font-size: 120%; font-family:"tahoma"; } thanks

    Read the article

  • iPad width in viewport settings overflowing past device width

    - by user1327771
    I am at my wit's end here, and I beseech the fine folks here at stackoverflow for help. I am working on a design for a blog for a friend of mine, and I'm working in HTML5. I am trying to get the width of the page to span the width of an iPad. So, in my document head, I have the following: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> Now, if you go to the index page, on an iPad, it looks just fine. The width of the page spans the width of the iPad in portrait mode, as I expect it to: http://www.alanreuterart.com/femmegamers/index.html It also looks fine on any individual blog posts as well. However, on the "about" and "join" pages, the width does not do this. It's actually overflowing past the length of the iPad to the right. View the following page on an iPad to see what I mean: http://www.alanreuterart.com/femmegamers/about.html I've tried everything. I cannot, for the life of me, figure out how to get it those two pages to correctly span the device width of the iPad. One important note, though: before anyone tells me to set my viewport width to 960, I cannot do that because the pages have media queries in them to convert to a mobile layout for the iPhone and other mobile phones. (I am not making a special unique layout for the iPad.) Can ANYONE help out here? Thanks in advance! —Me.

    Read the article

  • WriteableBitmap failing badly, pixel array very inaccurate

    - by dawmail333
    I have tried, literally for hours, and I have not been able to budge this problem. I have a UserControl, that is 800x369, and it contains, simply, a path that forms a worldmap. I put this on a landscape page, then I render it into a WriteableBitmap. I then run a conversion to turn the 1d Pixels array into a 2d array of integers. Then, to check the conversion, I wire up the custom control's click command to use the Point.X and Point.Y relative to the custom control in the newly created array. My logic is thus: wb = new WriteableBitmap(worldMap, new TranslateTransform()); wb.Invalidate(); intTest = wb.Pixels.To2DArray(wb.PixelWidth); My conversion logic is as such: public static int[,] To2DArray(this int[] arr,int rowLength) { int[,] output = new int[rowLength, arr.Length / rowLength]; if (arr.Length % rowLength != 0) throw new IndexOutOfRangeException(); for (int i = 0; i < arr.Length; i++) { output[i % rowLength, i / rowLength] = arr[i]; } return output; } Now, when I do the checking, I get completely and utterly strange results: apparently all pixels are either at values of -1 or 0, and these values are completely independent of the original colours. Just for posterity: here's my checking code: private void Check(object sender, MouseButtonEventArgs e) { Point click = e.GetPosition(worldMap); ChangeNotification(intTest[(int)click.X,(int)click.Y].ToString()); } The result show absolutely no correlation to the path that the WriteableBitmap has rendered into it. The path has a fill of solid white. What the heck is going on? I've tried for hours with no luck. Please, this is the major problem stopping me from submitting my first WP7 app. Any guidance?

    Read the article

  • UITableViewIndex Grows to Incorrect Bounds Unexpectedly

    - by chadburggraf
    I have a standard UITableView + UISearchDisplayController + UITableViewIndex setup. Everything works like a champ. Except, under very specific conditions, the index grows too long to display on the screen. Specifically, after ending a search and re-displaying the unfiltered, indexed table, the index sometimes grows too long. More specifically, this doesn't happen if I search then cancel. It only happens if I search, then push a view controller from the search table, then pop that view controller back to the still-searching table, then cancel the search, then re-search and then cancel that final search. After the end of the final search the index is too long. In portrait, the table view is reporting a height of 416 and the index a height of 404 under normal conditions. If I log from searchDisplayControllerDidEndSearch when the index is sized incorrectly, it is reporting a height of 620. I've tried everything from setLayout on the table and the index to manually re-sizing the frame. Nothing works (the manual re-size causes the correct height to be logged, but it doesn't change the display on screen). I was about to try re-sizing after a delay in case the cancel animation was interfering, but then I realized what an absurd situation I'm in and thought seeking help might be wise...

    Read the article

  • Rotating UIWebView with transform, content partially off screen, how to get it to stick on screen?

    - by jarmod
    I have a 320x416 portrait-shaped UIWebView filling a UIViewController's view. I also have a 90 degree rotate button that will transform the UIWebView through 90 degrees each time the button is touched. The code is basically: webView.transform = CGAffineTransformMakeRotation(touches%4 * M_PI/2.0); After rotation through 90 degrees, the now-landscape transformed UIWebView extends beyond both the left and right edges of the screen. In the process of applying the transformation, iPhone OS has changed the UIWebView's frame from {{0,0}, {320,416}} to {{-48,48}, {416,320}}. Don't have a problem with that. I then tweak the UIWebView's frame origin to (0,0) so that it starts top-left, but extends a little further beyond the right edge of the screen. Now, I can touch the UIWebView and pull it left to view the hidden information on the right but I cannot get the right-hand end to to stay on the screen -- the moment I untouch it, the right side bounces back off the screen. What is it that causes the view to bounce back off-screen? In other words, what is it that I need to tweak to allow either the left edge or the right edge to stick on the screen and remain visible (only one at a time, obviously)? Thanks.

    Read the article

  • Two radically different queries against 4 mil records execute in the same time - one uses brute force.

    - by IanC
    I'm using SQL Server 2008. I have a table with over 3 million records, which is related to another table with a million records. I have spent a few days experimenting with different ways of querying these tables. I have it down to two radically different queries, both of which take 6s to execute on my laptop. The first query uses a brute force method of evaluating possibly likely matches, and removes incorrect matches via aggregate summation calculations. The second gets all possibly likely matches, then removes incorrect matches via an EXCEPT query that uses two dedicated indexes to find the low and high mismatches. Logically, one would expect the brute force to be slow and the indexes one to be fast. Not so. And I have experimented heavily with indexes until I got the best speed. Further, the brute force query doesn't require as many indexes, which means that technically it would yield better overall system performance. Below are the two execution plans. If you can't see them, please let me know and I'll re-post then in landscape orientation / mail them to you. Brute-force query: Index-based exception query: My question is, based on the execution plans, which one look more efficient? I realize that thing may change as my data grows.

    Read the article

  • Android - Basic CRUD (REST/RPC client) to remote server

    - by bsreekanth
    There are lot of discussion about REST client implementation in android, based on the talk at GoogleIO 2010, by Virgil Dobjanschi. My requirement may not necessarily involved, as I have some freedom to choose the configuration. I only target tablets configuration changes can be prevented if no other easy way (fix at Landscape mode etc) I am trying to achieve. Basic CRUD operation to my server (JSON RPC/ REST). Basically mimic an ajax request from android app (no webview, need native app) Based on the above mentioned talk, and some reading I see these options. Implement any of the 3 mentioned in the Google IO talk Especially, the last pattern may be more suitable as I don't care much of caching. But not sure how "real time" is sync implementation. Use HTTP request in AsyncTask. Simplest, but need to avoid re-sending request during change in device configuration (orientation change etc). Even if I fix at one orientation, recreation of activity still happens. So need to handle it elegantly. Use service to handle http request. So far, it say use service for long ruiing request. Not sure whether it is a good approach for simple GET/POST/PUt requests. Please share your experience on what could be the best way.

    Read the article

  • jquery CSS doesn't work in webkit

    - by Mauro74
    I'm trying to apply some css to an image tag if the image is portrait, but for some reason .css() doesn't work in webkit. Basically the image tag doesn't get the 'style' property. Here's my code: $(document).ready(function () { $('.listing .item .thumb img').each(function () { var _img = $(this); var _imgWidth = _img.outerWidth(); var _imgHeight = _img.outerHeight(); if (_imgHeight > _imgWidth) { _img.css('top', '-40%'); } }); }); <div class="listing about"> <div class="item"> <a href="#" class="thumb"> <img src="../_uploads/siteassets/images/thumb-carousel-2.jpg" /> <span class="frame"></span> </a> <span class="snippet"> <a href="#" class="title">Name Surname</a> <span class="date">Role in the company</span> <p class="description">Lorem ipsum dolor sit amet...</p> </span> </div> </div> I've tried to use .attr() instead of .css() but nothing. It doesn't work! Any idea why?

    Read the article

  • horizontal uiview's controls unresponsive.. or how to foul up a view hierarchy

    - by Oldmicah
    Hello all, I'm working on an app that has two sections, a config section and a results section. My config section needs to be 2 separate views (horizontal and vert, and yes, I can hear the intake of breath from here), with one rotatable view for the results. b/c of layout restraints and a lot of pain around rotation, I'm not using a navigation controller. I've been experiencing the joys of rotation experimentation and have settled upon keeping my views contained as subviews of my view controller. i.e. view controller.view.subviews = configH, configV, and results. I then use the controller.view bringSubviewToFront to bring the either the configH, configV, or the result view to the front. Rotation works-queue(humor intended) the angelic choirs... almost. What's happening is that my configV button's are responsive, but when the device (or simulator) is rotated, my configH controls are not. (configV is the second subview added, but the first one to be brought to the front because app comes up in portrait mode) The controls on the results view also work. Plan B was to assign the controller.view to configH, configV, or results. All of my controls now work, but rotation is now fouled up. Question 1: Is there a better way to do this? (a horizontal and vertical config view and a rotatable results view) Question 2: Does the above suggest a design issue, or is it more likely that my addled brain is just missing something in my own code. (nothing from the peanut gallery please) many thanks!

    Read the article

  • Storyboard Bug - iOS 5.1 - Xcode 4.3.3

    - by user1505431
    In my iOS project (using xcode only), I continue to run into a problem where layout presented to me in the storyboard editor becomes automatically modified after some change (which I have not been able to specifically determine). The problem is as follows: The TabBarController has for whatever reason started displaying in landscape orientation. Some of the NavigationControllers have also done the same thing. I can no longer see or edit the navigation bar on my nested views. I can no longer see of edit the tab bar on the views of the resp. tab bar items. Everything works properly when I run the app in my simulator. If I had set it up prior to this change in default display settings, it still works just fine. Here is a screen shot of the problem: My storyboard has consistently presented me with this bug throughout the course of my project. I have fixed it once by resetting via git and another time by rebuilding the entire storyboard. Both solutions worked for an extended period of time, but I would rather have a permanent solution. Any input would be helpful.

    Read the article

  • Orientation issue while presenting Modal ViewController

    - by Jacky Boy
    Current scenario: Right now I am showing a UIViewController using a segue with the style Modal and presentation Sheet. This Modal gets its superview bounds change, in order to have the dimensions I want, like this: - (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; self.view.superview.bounds = WHBoundsRect; } The only allowed orientations are UIInterfaceOrientationLandscapeLeft and UIInterfaceOrientationLandscapeRight. Since the Modal has some TextFields and the keyboard would be over the Modal itself, I am changing its center so it moves a bit to the top. The problem: What I am noticing right now, is that I am unable to work with the Y coordinate. In order for it move vertically (remember it's on landscape) I need to work with the X. The problem is that when it's UIInterfaceOrientationLandscapeLeft I need to come with a negative X. And when it's UIInterfaceOrientationLandscapeRight I need to come with a positive X. So it seems that the X/Y Coordinate System is "glued" to the top left corner while in Portrait and when an orientation occurs, it's still there: What I have done So I have something like this: UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; NSInteger newX = 0.0f; if (orientation == UIInterfaceOrientationLandscapeLeft) { // Logic for calculating the negative X. } else { // Logic for calculating the positive X. } It works exactly like I want, but it seems a very fragile implementation. Am I missing something? Is this the expected behaviour?

    Read the article

  • Not able to scroll the listbox in WP7.

    - by Shaireen
    I have a listbox control where items are added using a user control having a textblock and image. <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" d:DesignHeight="52" d:DesignWidth="480"> <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}"> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,10,0,0" Name="Index_itemtext" Text="" VerticalAlignment="Top" Width="145" /> <Image Height="34" HorizontalAlignment="Right" Margin="0,6,55,0" Source="blue_triangle.png" Name="IndexList_itemImage" Stretch="Uniform" VerticalAlignment="Top" Width="66" /> <Line Height="10" HorizontalAlignment="Left" Margin="0,38,0,0" Name="seperator_line" Stroke="White" StrokeThickness="2" VerticalAlignment="Top" Width="480" Stretch="Fill" Fill="#FFF5E9E9" /> </Grid> And the list box xaml: <ListBox Name="Index_list" ScrollViewer.VerticalScrollBarVisibility="Visible" VerticalContentAlignment="Top" SelectionChanged="on_selection" Margin="0,78,0,0"> </ListBox> Now when i add the items to the list ,the vertical scroll does not go till the last item i.e. it comes back to first row which stops from last item selection: for (int i = 0; i < gridSize; i++) { listbox_item list_item = new listbox_item(); list_item.Index_itemtext.FontSize = 25; list_item.Index_itemtext.Text = index[i]; list_item.IndexList_itemImage.Source = new BitmapImage(new Uri("some.png", UriKind.Relative)); list_item.seperator_line.StrokeThickness = 5; list_item.Margin = new Thickness(0, 0, 0, 5); Index_list.Items.Add(list_item); } Also the list row does not occupy the width of device in landscape mode,whereas the requirement is that the row item widens as the device width changes.Can someone help with these problems?

    Read the article

  • FragmentActivity cannot be resolve to a type

    - by Pratik
    I am starting learning for android tablet programming and I am able to updated my Eclipse as well as all new sdk for android. I have start testing application from this blog while at extending the FragmentActivity getting this error I have google it but not getting any solution. My project was created with 3.0 version having 11 level, all other packages are successfully used in the code but only this FragmentActivity was not able to resolve. Am I missing any library or any thing? My code public class Testing_newActivity extends FragmentActivity { // here the FragmentActivity getting error package not found for import /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { // If the screen is now in landscape mode, we can show the // dialog in-line so we don't need this activity. finish(); return; } if (savedInstanceState == null) { // During initial setup, plug in the details fragment. DetailsFragment details = new DetailsFragment(); details.setArguments(getIntent().getExtras()); getSupportFragmentManager().beginTransaction().add( android.R.id.content, details).commit(); } } } android manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.searce.testingnew" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Testing_newActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

    Read the article

  • What do I name classes whose only purpose is to act as a structure?

    - by Sergio Tapia
    For example, take my Actor class: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; namespace FreeIMDB { class Actor { public string Name { get; set; } public Image Portrait { get; set; } public DateTime DateOfBirth { get; set; } public List<string> ActingRoles { get; set; } public List<string> WritingRoles { get; set; } public List<string> ProducingRoles { get; set; } public List<string> DirectingRoles { get; set; } } } This class will only be used to stuff information into it, and allow other developers to get their values. What are these types of classes officially called? What is the correct nomenclature?

    Read the article

  • Mysterious horizontal lines on my site when rendered on iPad

    - by Ferdy
    The following site: http://staging.jungledragon.com Has a few rendering issues on the iPad using Safari, so I'm trying to fix them. There is one issue where I am stuck though. If you have an iPad, open the site in portrait mode. There are two unwanted horizontal lines appearing, a top one that crosses the tabs (Popular, Fresh, etc) and a bottom one that sits right above the lizard illustration. Both lines should not be there. These lines do not appear on any other browser tested, including Safari on Windows. When you move that same site into landscape mode on the iPad, the top horizontal line dissapears, whilst the bottom one stays. If you zoom in a bit to the bottom line, it then dissapears too. I've been trying out various CSS fixes to no avail and am now beginning to think this is a rendering issue of Safari, although possibly triggered by me. Any help is greatly appreciated. It seems like a minor issue but I hate sloppiness.

    Read the article

  • "reset" cells after changing orientation

    - by Christian
    Hi, I added the interfaceOrientation to my app. It works fine concerning the views. Some of the table-cells I defined by CGRects to position the text in the cell. In portrait-mode the cell is 300px long, in landscape-mode 420px. I use the following code to change the CGRects depending the orientation: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.interfaceOrientation == UIDeviceOrientationPortrait) { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 300, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]initWithFrame:keyLabelRect]; keyLabel.tag = 100;......... } else { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 450, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]..... My problem is, when the table is visible and the orientation is changed, I need to scroll to see the new "layout". How can I manage to "reload" the view after changing the orientation?

    Read the article

  • Aligning messageformat on printing a JTable.

    - by DanielFH
    I'm using this for the moment to print out my table, and it works. But I'm not really happy with the layout of the messageformatting, I would like to have both pagenumber and date in the footer, and date format aligned to the left side of the table, and page to the right. How can I do that? Been reading some stuff about overriding the PrintTable method, but seems to get pretty complex from what I've read. Hope you can help me with this issue, thank you. :) import javax.print.attribute.HashPrintRequestAttributeSet; import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.standard.OrientationRequested; import javax.swing.JTable; import dk.beesys.rims.ui.WindowInventory; public class Print { private static Print INSTANCE; public static Print getInstance() { if (INSTANCE == null) { INSTANCE = new Print(); } return INSTANCE; } private Print(){ } public void printList(java.awt.event.ActionEvent ignore) { String strDate = MessageFormat.format("{0,date,short} {0,time,short}", new Date()); MessageFormat header = new MessageFormat("- {0} -"); MessageFormat footer = new MessageFormat("Printed: " + strDate); PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add(OrientationRequested.LANDSCAPE); try { WindowInventory.getInstance().getTable().print(JTable.PrintMode.FIT_WIDTH, header, footer, true, aset, true); } catch (java.awt.print.PrinterException e) { System.err.format("Cannot print %s%n", e.getMessage()); } }

    Read the article

  • Resize my image on upload not working - what must my buffer be?

    - by Etienne
    This is the code i got from This Link I want the user to upload a picture and then resize it............. Public Sub ResizeFromStream(ByVal ImageSavePath As String, ByVal MaxSideSize As Integer, ByVal Buffer As System.IO.Stream) Dim intNewWidth As Integer Dim intNewHeight As Integer Dim imgInput As System.Drawing.Image = System.Drawing.Image.FromStream(Buffer) 'Determine image format Dim fmtImageFormat As ImageFormat = imgInput.RawFormat 'get image original width and height Dim intOldWidth As Integer = imgInput.Width Dim intOldHeight As Integer = imgInput.Height 'determine if landscape or portrait Dim intMaxSide As Integer If (intOldWidth >= intOldHeight) Then intMaxSide = intOldWidth Else intMaxSide = intOldHeight End If If (intMaxSide > MaxSideSize) Then 'set new width and height Dim dblCoef As Double = MaxSideSize / CDbl(intMaxSide) intNewWidth = Convert.ToInt32(dblCoef * intOldWidth) intNewHeight = Convert.ToInt32(dblCoef * intOldHeight) Else intNewWidth = intOldWidth intNewHeight = intOldHeight End If 'create new bitmap Dim bmpResized As Drawing.Bitmap = New Drawing.Bitmap(imgInput, intNewWidth, intNewHeight) 'save bitmap to disk bmpResized.Save(ImageSavePath, fmtImageFormat) 'release used resources imgInput.Dispose() bmpResized.Dispose() Buffer.Close() End Sub Now when i click on my submit button it must execute my code but i am not sure what the input must be for the Buffer field? Protected Sub btnUpload_Click() Handles btnUpload.Click ResizeFromStream("~Pics", 200, ??????????) End Sub Thanks in advanced! Edit I need to get my Image from the File Upload control!

    Read the article

  • CodeIgniter - Image Validation & Thumbnailing

    - by Sebhael
    I'm currently trying to create a function that validates and creates thumbnails for images on upload - but I'm quite lost on what I'm doing. I'm assuming I'm off on my terminology so I'm not really getting any search results to help point me in the right direction. My playground is a form with 6 upload fields that are required. One of these fields is for a simple 32x32 icon image, another a portrait orientation (most likely) photo, and then 4 standard desktop screenshots -- and I'm using CodeIgniter as my framework. I would like to create a function that validates/thumbnails images, and only have to call it on the validation if at all possible. I know I can achieve this per-image, since the documentation for CI is quite through on this - but to reduce redundancy I'm looking for the better option. Outside of that, I don't even actually understand in full how to manipulate images unless it's just $this-input-post('field') - then calling all functions onto this? I don't know, I'm confused and posting on the actual CI forums has yielded me nothing - so all I'm really looking for is a point in the right direction to understanding what I'm trying to achieve here. This also all might not make any sense, I know it doesn't to me - but I can explain more if needed. Thanks in advance.

    Read the article

  • TableLayout formatting loss after device rotation

    - by roundhill
    I'm seeing a strange issue with a TableLayout after the device is rotated from either orientation. If you load the view in either portrait or landscape mode, the table loads fine. But once you rotate the device, the columns collapse to just fit their width. I would expect that after rotation, the columns would still stretch to fit the width of the screen. Any ideas on what can be done to resolve this? Screenies and layout code below. Before Rotation: After Rotation: Table Layout: <TableLayout android:id="@+id/dataTable" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:layout_below="@id/chart" android:stretchColumns="*" android:shrinkColumns="*" android:padding="6dip" > </TableLayout> Table Row: <TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/col1" android:layout_marginRight="2dip" android:textColorLink="#FF21759b" android:text="Column 1" android:padding="4dip" android:textColor="#FF464646"/> <TextView android:id="@+id/col2" android:text="Column 2" android:textColor="#FF464646" android:padding="4dip"/> </TableRow> Thanks!

    Read the article

  • Does tableViewController behave incorrectly when hosted by a popoverController?

    - by dugla
    I have made countless test examples of a tableViewController hosted by a popoverController and I have come to the following conclusion: It does not appear possible to pre-select a tableView cell. It is possible to do pre-selection when a tableViewController is hosted by a splitviewController. I am using the exact same tableViewController code. Here is the relevant tableViewController view lifecycle method that is misbehaving: static BOOL firstTime = YES; - (void)viewDidAppear:(BOOL)animated { NSLog(@"Root ViewController - view Did Appear"); [super viewDidAppear:animated]; if (firstTime == YES) { firstTime = NO; NSIndexPath *preselectedCell = [NSIndexPath indexPathForRow:5 inSection:0]; [self.tableView selectRowAtIndexPath:preselectedCell animated:NO scrollPosition:UITableViewScrollPositionTop]; detailViewController.detailItem = [NSString stringWithFormat:@"Row %d", preselectedCell.row]; } // if (firstTime == YES) } The above code correctly preselects a tableView cell the first time the tableView is unfurled in the splitViewController case (device in portrait mode). Can someone please, please, explain what I am doing wrong. I am completely stumped. Thanks, Doug

    Read the article

  • How can I make a home widget behave like a launcher icon?

    - by Tughi
    I have a widget that acts as a launcher on the home screen. How can I make it behave like a launcher icon? I use this layout for portrait: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:background="@drawable/widget_background_selector" android:focusable="true" android:layout_width="74dip" android:layout_height="79dip" android:layout_marginLeft="3dip" android:layout_marginTop="14dip"> <ImageView android:id="@android:id/background" android:layout_width="72dip" android:layout_height="72dip" android:layout_marginLeft="1dip" android:layout_marginTop="4dip" /> </RelativeLayout> </RelativeLayout> And this is the background selector: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/widget_background_pressed" /> <item android:state_window_focused="true" android:state_focused="true" android:drawable="@drawable/widget_background_focused" /> <item android:state_window_focused="false" android:state_focused="true" android:drawable="@android:color/transparent" /> </selector> This way if I use the DPAD the widget is focusable but the click doesn't work. The touch still works but the widget is not displayed as focused. Any idea what I do wrong?

    Read the article

  • Setting up padding for websites in mobile devices

    - by ambrelasweb
    I had finished this website a while ago but something happened to it and I've now spent all day fixing it and getting it back from scratch as my backup wasn't correctly done. I don't quite understand what it's doing as I've done this technique on many other websites with no troubles, maybe I've looked at this website too long? Here is the website. I'm wanting to put some space on the left and right hand side, however I dont just have one container as I was needing the dark grey bar at 100% of the screen and always under the banner no matter where it was. So there are 4 "containing" divs that I want to have the space. I've placed soem CSS3 media queries in but now I'm getting a gap to the right. I was thinking it was because my background mages are going all the way across but they set at 100% so I'm just not understanding whats going on. It's somethign simple, I'm not seeing it right now.. This is what I have for the media queries /* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { #header, #banner, #main, #footer-widget-area { padding: 0 2em 0 2em; } } This is what t looks like on my iPhone Any advice is helpful and appreciated.

    Read the article

  • Positioning objects in views during re-orientation in iPad

    - by Arni
    iPad Gurus: Apple wants us to support all orientations. I take that to mean that a particular layout should either rotate so that all objects are positioned relatively the same OR, if that doesn't look good, then they ought to be repositioned, OR two views ought to be designed and built. If I rely on the built-in rotation mechanism, the objects either get resized or they straddle the edge of the page in one orientation or the other, or they disappear from view altogether. I can't seem to find the right settings to get the objects to align clearly so they are seen in each orientation. Repositioning leads to a lot of if statements in the View Controller. So I don't think Apple had that in mind. I tried replacing views and even view controllers in "willRotateToInterfaceOrientation" method, but that either causes crashes or the portrait views end up in landscape unexpectedly and vv. Moreover, two view controllers means double the coding for the same view. There must be proper way to handle orientation changes, but I have searched the internet and documentation and sample code in vain for something that works. How is this done properly? Thanks!

    Read the article

  • C++: Weird Segmentation fault.

    - by Kleas
    I am trying to print something using C++. However, I am running into a strange bug that has left me clueless, I use the following code: PRINTDLG pd; ZeroMemory(&pd, sizeof(pd)); pd.lStructSize = sizeof(pd); pd.Flags = PD_RETURNDEFAULT; PrintDlg(&pd); // Set landscape DEVMODE* pDevMode = (DEVMODE*)GlobalLock(pd.hDevMode); pDevMode->dmOrientation = DMORIENT_LANDSCAPE; pd.hwndOwner = mainWindow; pd.Flags = PD_RETURNDC | PD_NOSELECTION; GlobalUnlock(pd.hDevMode); if (PrintDlg(&pd)) { DOCINFO di; di.cbSize = sizeof(DOCINFO); di.lpszDocName = "Test Print"; di.lpszOutput = (LPTSTR)NULL; di.fwType = 0; //start printing StartDoc(pd.hDC, &di); int a; int b; int c; int d; int e; int f; // int g; // Uncomment this -> CRASH EndDoc(pd.hDC); DeleteDC(pd.hDC); } else { cout << "Did not print: " << CommDlgExtendedError() << endl; } The moment I uncomment 'int g;' I get a: "Program received signal SIGSEGV, Segmentation fault." I use codeblocks and the mingw compiler, both up to date. What could be causing this?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >