Images taken with ACTION_IMAGE_CAPTURE always returns 1 for ExifInterface.TAG_ORIENTATION on some Gingerbread devices

Ok guys, it seems like this bug for android won’t be fixed for a while. Although I found a way to implement the ExifInformation so that both devices (ones with proper Exif tag, and also improper exif tags work together).. So the issue is on some (newer) devices, there’s a bug that makes the picture … Read more

Android onConfigurationChanged not being called

This was my gremlin for the ~same problem: Caution: Beginning with Android 3.2 (API level 13), the “screen size” also changes when the device switches between portrait and landscape orientation. Thus, if you want to prevent runtime restarts due to orientation change when developing for API level 13 or higher (as declared by the minSdkVersion … Read more

How can I change the scroll direction in UICollectionView?

UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; [flowLayout setScrollDirection:UICollectionViewScrollDirectionVertical]; Note too that it seems to be fine to call this in prepareForLayout in your flow layout… @interface LayoutHorizontalThings : UICollectionViewFlowLayout @end @implementation LayoutHorizontalBooks -(void)prepareLayout { [super prepareLayout]; self.scrollDirection = UICollectionViewScrollDirectionHorizontal; self.minimumInteritemSpacing = 0; self.minimumLineSpacing = 0; self.itemSize = CGSizeMake(110,130); self.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0); }

Responsive site is zoomed in when flipping between Portrait and Landscape on iPad/iPhone

You also want to add the maximum scale <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″> UPDATED I agree with some of the comments, the declaration should not limit the scaling by the user as this is bad practice. The below is a better approach and I believe that the zooming bug has long since been fixed by … Read more

Set a border around a StackPanel.

What about this one : <DockPanel Margin=”8″> <Border CornerRadius=”6″ BorderBrush=”Gray” Background=”LightGray” BorderThickness=”2″ DockPanel.Dock=”Top”> <StackPanel Orientation=”Horizontal”> <TextBlock FontSize=”14″ Padding=”0 0 8 0″ HorizontalAlignment=”Center” VerticalAlignment=”Center”>Search:</TextBlock> <TextBox x:Name=”txtSearchTerm” HorizontalAlignment=”Center” VerticalAlignment=”Center” /> <Image Source=”lock.png” Width=”32″ Height=”32″ HorizontalAlignment=”Center” VerticalAlignment=”Center” /> </StackPanel> </Border> <StackPanel Orientation=”Horizontal” DockPanel.Dock=”Bottom” Height=”25″ /> </DockPanel>

Detecting iOS orientation change instantly

Add a notifier in the viewWillAppear function -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil]; } The orientation change notifies this function – (void)orientationChanged:(NSNotification *)notification{ [self adjustViewsForOrientation:[[UIApplication sharedApplication] statusBarOrientation]]; } which in-turn calls this function where the moviePlayerController frame is orientation is handled – (void) adjustViewsForOrientation:(UIInterfaceOrientation) orientation { switch (orientation) { case UIInterfaceOrientationPortrait: case … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)