Search Results

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

Page 26/38 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Force maximum width and height for PHPThumb images

    - by Peter
    PHPThumb provides two great variables setting the output maximum width and height BUT "This is always overridden by ?w=_ GETstring parameter" $PHPTHUMB_CONFIG['output_maxwidth'] = 720; $PHPTHUMB_CONFIG['output_maxheight'] = 720; You can also set defaults, and for landscape/portrait: $PHPTHUMB_DEFAULTS['w'] = 720; $PHPTHUMB_DEFAULTS['h'] = 720; $PHPTHUMB_DEFAULTS['hp'] = 720; $PHPTHUMB_DEFAULTS['wl'] = 720; You can set the getsringoverride to enforce the default width/height but then you can't have width/height smaller than the default. $PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE = false; There doesn't seem to be a way to allow the get paramaters to be used but if entering a value higher than the output_maxwidth/height it outputs that size, not the maximum. How can the output be explicitly restricted to a maximum size, hence protecting the source images?

    Read the article

  • Is It Possible To Use Javascript/CSS To Swap Style Sheets When A Mobile Device Rotates?

    - by Sean M
    I am working on a site that must be designed with mobile accessibility in mind. As part of our brainstorming, we wondered whether it's possible to detect, for a mobile browser (i.e. Mobile Safari or the Android browser), when the viewing device has changed orientation, and to use that as a trigger to change page content? As the title of this question implies, our best-case scenario is the ability to detect the orientation change and use it to alter the CSS on the fly so as to present a slightly different page for landscape versus portrait. Of course we can just design for a page that looks good one way and make it obvious that it's supposed to be viewed that way, but the cool-stuff factor of a page that looks good either way is pretty appealing. Is this idea implementable? Practical?

    Read the article

  • Rotate image in Quartz? Image is upside down! (iPhone)

    - by Johannes Jensen
    I don't want to transform the ENTIRE context. I'm making a game with Quartz, and I'm drawing my player with lines, rects and ellipses. And then I have diamong.png which I rendered at 0,0 in the top left of the screen. Problem is... It renders upside down! How would I rotate it 180 degrees? Here's some of my code: CGImageRef diamondImage = CGImageRetain([UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"Diamond.png" ofType:nil]].CGImage); CGContextDrawImage(context, CGRectMake(0, 0, 32, 24), diamondImage); If it's of any help, I'm using Landscape mode, with home button to the right. It's defined both in my .plist, and in my ViewController's -shouldAutorotateToInterfaceOrientation:interfaceOrientation: How would I rotate/transform it?

    Read the article

  • How to detect orientation change in home screen widget?

    - by kknight
    I am writing a home screen widget and want to update the home screen widget when the device orientation changes from portrait to landscape or the other way. How can I make it? Currently, I tried to reigster to CONFIGURATION_CHANGED action like the code below, but the Android didn't allow me to do that by saying "IntentReceiver components are not allowed to register to receive intents". Can someone help me? Thanks. public class MyWidget extends AppWidgetProvider { @Override public void onEnabled(Context context) { super.onEnabled(context); this.registerReceiver(this, new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); }

    Read the article

  • Why are Views loaded from nibs being placed 20 pixels down from the status bar?

    - by rickharrison
    I am trying to set up a layout as such in an iPad application. It will have three major views, which make up the whole screen. The views will be stacked one on top of the other, each taking up the full width. I have one major nib file which accounts for the entire screen space. In that nib file, I am instantiating the three view controllers with outlets. Then I have this code: - (void)viewDidLoad { [super viewDidLoad]; [self.view addSubview:controllerOne.view]; [self.view addSubview:controllerTwo.view]; [self.view addSubview:controllerThree.view]; } This adds the views on top of one another and 20 pixels lower. However, after rotating to landscape and back they are right under the status bar. Do you know what would be causing this?

    Read the article

  • UIViewController dismissModalViewControllerAnimated: causes main window to disappear

    - by Jim
    I want to present a modal mail dialogue like so in the iPad app: MFMailComposeViewController* picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setSubject:title]; [picker setMessageBody:[NSString stringWithFormat:[self emailBody], title, [link absoluteString]] isHTML:YES]; [self.viewController presentModalViewController:picker animated:YES]; The following delegate is called when the user sends/cancels: - (void) mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self.viewController dismissModalViewControllerAnimated:YES]; } This works great in portrait mode. In landscape mode the right hand pane of the UISplitViewController completely disappears.

    Read the article

  • UIView Clipped By Statusbar until Autorotate

    - by TonyNeallon
    Hi There, Ive created a multiview application that uses multiple controllers to display and control views. The problem Im having is, when the simulator initially loads the view the header is partially covered by the bar at top of screen and the tool bar at the base is not touching the base of the screen. I used the Interface builder size attributes to control the view when the iphone rotates and it works perfectly. All smaps into place perfectly both in landscape and portrait mode AFTER a rotation but the problem is with the initial load before a rotation occurs. Your thoughts a much appreciated. Tony

    Read the article

  • Two UIViews in one .xib file?

    - by Tronic
    hi, i made a second uiview in mei .xib file. the first view is landscape and i get it by following code ItemController *newItem; newItem = [[ItemController alloc] init]; newItem.view..... how can i "activate" the second view, so i can use it with newItem.view2... is that possible? the second view is portait mode, so it should be hidden and when turning the ipad the first view should be hidden and the second gets visible. thanks

    Read the article

  • how to target css to iPad but exclude Safari 4 desktop using a media query?

    - by miriam835work
    I am trying to use a media rule to target css to iPad only. I want to exclude iPhone/iPod and desktop browsers. I would like to to also exclude other mobile devices if possible. I have used <style type="text/css" media="only screen and (min-device-width: 768px) and (max-device-width: 1024px)"> but just found out that desktop Safari 4 reads it. I have tried variations with "481px" instead of "768px" and another that adds an orientation to that: <style type="text/css" media="only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)"> but not luck. (Later we will be sniffing user-agent strings for iPad, but for now that solution won't work.) Thanks!

    Read the article

  • playing video in custom size screen - view in iphone

    - by sagar
    OK. Some New Query Here. Suppose user taps on a button & video begins to play. Now when video plays, it always in full screen mode. But what do i need is explained below. Video should be played in a portrait mode. (but normally video is played in landscape mode ). How? Thanks in advance for sharing your knowledge with SO...

    Read the article

  • Two UITabBarControllers and Autorotation

    - by optimisticmonkey
    I have two UITabBarControllers in my mainwnidow.nib wired to my appdelegate. In my app delegate, I can load either one: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //either [window addSubview:tabBarController.view]; //or [window addSubview:tabBar2Controller.view]; [window makeKeyAndVisible]; } and autorotation works. If I add both (with the expectation to swap between them later): [window addSubview:tabBarController.view]; [window addSubview:tabBar2Controller.view]; then autorotation stops working...everything is always portrait. Thanks in advance for any tips...

    Read the article

  • 'e-Commerce' scalable database model

    - by Ruben Trancoso
    I would like to understand database scalability so I've just heard a talk about Habits of Highly Scalable Web Applications http://techportal.ibuildings.com/2010/03/02/habits-of-highly-scalable-web-applications/ On it, the presenter mainly talk about relational database scalability. I also have read something about MapReduce and Column oriented tables, big tables, hypertable etc... trying to understand which are the most up to date methods to scale web application data. But the second group, to me, is being hard to understand where it fits. It serves as transactional, reliable data store? or not, its just for large access and processing and to handle fine graned operations we will ever need to rely on RDBMSs? Could someone give a comprehensive landscape for those new technologies and how to use it?

    Read the article

  • Virtual Keyboard doesn't appear when rotate the screen?

    - by user164589
    Hi guys. I am facing to a problem related virtual keyboard. I've created a layout that contains Button, TextView and EditText. When its screen orientation is Portrait, it can show the Virtual Keyboard by one touching on the EditText. Then I've changed screen orientation to Landscape. At this moment Virtual Keyboard hasn't been appeared. What is wrong here ? How to fix it ? I think this is big problem for my application. Please help. guys. Thanks.

    Read the article

  • iphone/ipad application - taking screen shot

    - by satyam
    I successfully implemented an application that works on ipad as well as on iphone. In that I provided option to user to send the screen shot of the application as mail attachment. Even that is functioning well. But my code is taking screen shot irrespective of orientation. The image i'm getting is always in portrait mode. I want to take the screen shot depending on the orientation of ipad/iphone and send the image as attachment. I'm using following code to take the screen shot. UIGraphicsBeginImageContext(screenWindow.frame.size); [screenWindow.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();

    Read the article

  • Android: Saving custom button and spinner

    - by Jacob Huggart
    Hello All, I am new to Android programming and was handed a fairly large program that is almost complete, but needed support for switching between portrait and landscape view. I added android:configChanges="keyboardHidden|orientation" to the manifest and used onConfigurationChanged to save the view data and that works. However, there is a button that displays the date selected (when pressed a calendar to select the date comes up) and a spinner that displays the current view and is used to select a new view. Those two items are being cleared/reset and do not work at all after the screen flip. I have been attempting to use onSaveInstanceState and onRestoreInstanceState to fix that, but I cannot figure out how to get it to work. Any advice?

    Read the article

  • CSS for mobile sometimes reverts back to original

    - by Jessie
    So most of the time my stylesheets appear properly. The standard/original one always works flawlessly, however it seems sometimes the mobile one is disregarded when looked at from a mobile device I have them designated as follows: <link runat="server" href="CustomStyleSheets/Menu.css" rel="stylesheet" type="text/css" /> <link href="CustomStyleSheets/mobile.css" rel="stylesheet" type="text/css" media="only screen and (max-device-width: 799px)" /> I'm using a Droid X to view the page, in portrait mode, so the device width shouldn't be exceeding the max-width specified above, but sometimes, randomly, it still reverts back to the original css page. Any way to keep it from doing so?

    Read the article

  • Formula for producing a CGRect for a UIScrollView, that displays a UIImage in scaled to fit way

    - by RickiG
    Hi I am loading in images with varying sizes and putting them in UIScrollViews, all the images are larger than the UIScrollView. The user can scroll and zoom as they please, but initially I would like for the image to be centered and scaled so the largest side of the image aligns with the edge of the scrollView, i.e. if the picture is in landscape I would like to size and scale it so that the left and right side goes all the way to the edge of the UIScrollVIew and vice versa I found a formula in a utility function in the Programming guide but it does not quite fit my needs. My approach is to use: CGrect initialPos = ? [self.scrollView zoomToRect:initialPos animated:YES]; I know the size of my scrollView and the size of my image, what I need to figure out is the scale and CGRect to apply to the scrollView to center and size my image. Hope someone can help out:) Thanks

    Read the article

  • iPad: How Do I Limit the Number of Tabs in UITabBarController?

    - by Chris_K
    I'm converting an iPhone app to a universal app, which leaves me with a UITabBarController as the root view controller for a UISplitViewController. That is, the tab bar appears at the bottom of the left-hand view when the iPad is in landscape mode. On the iPhone, the system automatically limited the number of tabs shown in the tab bar to 5. But on the iPad simulator (which is all I have at the moment), my tab bar has 8 tabs, including the More tab. What gives? Thanks. Update: Since I had no luck finding an answer to this question, I gave up on using a tab bar interface in my iPad-flavored app. Instead, I added one more level to the navigation controller drill-down. That ends up working fine for this app.

    Read the article

  • GridView items are displaying the wrong drawables sometimes.

    - by originalbryan
    I've implemented a GridView based on this tutorial. It works great unless open up the search dialog or rotate the screen then scroll around. When the search dialog and virtual keyboard appear, the drawables for each of my grid items shift. I can click on them and they do what I expect, except the drawable is wrong. The same problem happens when I go into landscape mode and scroll around. If I scroll down, up, the down again, the drawables are shuffled. For better illustration, let's say I have three objects, each with an image. Obj A shows an Apple Obj B shows a Banana Obj C shows a Cantaloupe When the shift occurs I end up with: Obj A shows an Cantaloupe Obj B shows a Banana Obj C shows a Apple The problem isn't consistent between the two causes (search dialog and screen rotate n' scroll), but each cause itself is consistent. Scrolling around repeatedly reveals a pattern as does the search dialog appearing. How can I stop this from happening?

    Read the article

  • How to restrict html body width when not displayed on iPhone?

    - by Curyous
    I have set up a web page to look good on the small screen of an iPhone, but when viewed on the desktop, and going right across the width of the browser, it looks terrible. Is there a way I can restrict the width to say, 480px when viewed on a big screen? I tried body { margin-left:auto; margin-right:auto; max-width:480px; } but it seems to just set the width at 480px, even on an iPhone on portrait mode.

    Read the article

  • Performing complicated XPath queries in Scala

    - by Ken Bloom
    What's the simplest API to use in scala to perform the following XPath queries on a document? //s:Annotation[@type='attitude']/s:Content/s:Parameter[@role='type' and not(text())] //s:Annotation[s:Content/s:Parameter[@role='id' and not(text())]]/@type The only documentation I can find on Scala's XML libraries has no information on performing complicated real XPath queries. I used to like JDOM for this purpose (in Java), but since JDOM doesn't support generics, it will be painful to work with in Scala. (Other XML libraries for Java have tended to be even more painful in Java, but I admit I don't know the landscape real well.)

    Read the article

  • Shows different behaviour in release and debug mode .apk

    - by Ashique Muhammed
    My android application get restarted when I take the application from home screen, but this not a consistent. Some time it works perfectly (resume with the last visited activity). My application contains a splash screen activity and 5 activities in tab layout. Usage Start application After splash screen the application shows one of the activity in tab Press home button Try to invoke application from home screen Application gets restarted, it is not happening always. I am working on actual device. Android version 2.3.3 Here is the root activity in my manifest file. <activity android:name="com.nes.smrt.gui.Survey" android:theme="@android:style/Theme.NoTitleBar" android:screenOrientation="portrait" android:alwaysRetainTaskState="true"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> Any help would be greatly appreciated!

    Read the article

  • Trying to generate proportionally cropped thumbnails at a fixed width/height with PHP GD

    - by Chuck
    I'm trying to create a Thumbnail Generator in PHP with GD that will take an image and reduce it to a fixed width/height. The square it takes from the original image (based on my fixed width/height) will come from the center of the image to give a proportionally correct thumbnail. I'll try to demonstrate that confusing sentence with some nice ASCII :} LANDSCAPE EXAMPLE: XXXXXXXXXXXXXXXX XXXXOOOOOOOOXXXX XXXXOOOOOOOOXXXX XXXXOOOOOOOOXXXX XXXXOOOOOOOOXXXX XXXXXXXXXXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX PORTRAIT EXAMPLE: XXXXXXXX XXXXXXXX OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX As you can see, it pulls out a square from the center of the image to use as a thumbnail. It seems simple, in theory, to get the height/width of the image and then calculate the offset based on my fixed width/height to get the thumbnail. But I can't seem to think of a way to code it :/ Also, how would I go about resizing the image before pulling out the center square? So the thumbnail contains a detailed image of the original rather than some zoomed in graphic?

    Read the article

  • i have project code in cocos and cocos2d and have problem in orientation

    - by Sukhi
    i have project code in cocos and cocos2d and have problem in orientation . my game is in landscape mode part of its code in cocos2d and another one is in cocos . cocos2d views orientations is working fine . i put this code in appdelegate.m file -(void)orientationChanged:(NSNotification *)notification { UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; if( orientation == UIInterfaceOrientationLandscapeLeft) { [[CCDirector sharedDirector] setDeviceOrientation: kCCDeviceOrientationLandscapeRight]; } else if( orientation == UIInterfaceOrientationLandscapeRight) { [[CCDirector sharedDirector] setDeviceOrientation: kCCDeviceOrientationLandscapeLeft]; } } but when i go to cocos code its view look good but as soon as i change the rotation LandscapeRight to LandscapeLeft my views goes in potrate mode i wrote following code in UIViewController (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Overriden to allow any orientation. BOOL orienationStatus=FALSE; if (interfaceOrientation ==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight) { orienationStatus=TRUE; } return orienationStatus; } whats wrong in that i don't know .... help will be appreciated .....

    Read the article

  • UIWebView: Media Player Rotates View Controller

    - by RileyE
    I'm encountering an issue while using a webview. My app is currently a portrait application, but when a media player loads in a webview within my app, the user can rotate the player, which rotates my view controller as well. I know I can get a notification for when the player comes up and disappears, but is there a way to prevent it from rotating the controller in the first place? It doesn't seem like anyone has an answer. I have all of the standard "don't rotate unless if I tell you to" methods and plist values, but its still rotating. Its only when I load up a webview and the media player loads over it. If I rotate my device, the media player rotates along with it, which feels natural, but when I go back to the webview view controller, its rotated, which isn't good.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >