stretched

Android Switch thumb image stretched

ε祈祈猫儿з 提交于 2019-12-25 03:55:32
问题 I need a custom Switch in Android application. I'm using this code: <Switch android:id="@+id/switchmode" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:textOn="" android:textOff="" android:switchMinWidth="0dp" android:thumb="@drawable/switch_bg" android:track="@drawable/track_bg" android:layout_marginBottom="20dp" android:layout_marginRight="20dp" /> track_bg file is: <selector

Live camera is getting stretched while rendering using CIFilter. - Swift 4

落爺英雄遲暮 提交于 2019-12-18 09:46:25
问题 I want to apply camera filter while rendering, my code is... func session(_ session: ARSession, didUpdate frame: ARFrame) { let image = CIImage(cvPixelBuffer: frame.capturedImage) var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0 color.getRed(&r, green: &g, blue: &b, alpha: &a) filter.setDefaults() filter.setValue(image, forKey: kCIInputImageKey) filter.setValue(CIVector(x: r, y: 0, z: 0, w: 0), forKey: "inputRVector") filter.setValue(CIVector(x: 0, y: g, z: 0, w: 0), forKey:

UIImageView image stretched even though contentMode = UIViewContentModeScaleAspectFit

大憨熊 提交于 2019-12-10 12:33:32
问题 I am really disappointed by the way UIImageView displays the image. I have following piece of code: UIImageView *imgview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 100)]; imgview.image = [UIImage imageNamed:@"img.JPG"]; imgview.backgroundColor = [UIColor greenColor]; imgview.contentMode = UIViewContentModeScaleAspectFit; [self.view addSubview:imgview]; What I get is a following screenshot: http://img26.imageshack.us/img26/3686/screenshot20130123at629.png [image is stretched to

Multiscreen Support in android : Camera preview is stretched in Samsung Galaxy s4 mini issue android

两盒软妹~` 提交于 2019-12-10 10:22:41
问题 This is my Preview class to take a picture : it's working perfectly with many devices but Android Samsung Galaxy S4 shows me bad result => the problem that the image is stretched when preview. You can see the image below : Here is my code : class Preview extends ViewGroup implements SurfaceHolder.Callback { private final String TAG = "Preview"; SurfaceView mSurfaceView; SurfaceHolder mHolder; Camera.Size mPreviewSize; List<Camera.Size> mSupportedPreviewSizes; Camera mCamera; Preview(Context

android camera stretched in landscape mode

可紊 提交于 2019-12-03 03:45:34
问题 The app I'm writing requires camera functionality. So to learn about how to operate the camera, I followed this script: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html I have put the activity in my manifest, set the screen orientation for it on landscape mode. The problem I'm having is, when the camera is held sideways (so I hold my Galaxy Tab P1000 in landscape position) the view is stretched out. To be more specific about my

Spinner's background image appears stretched

丶灬走出姿态 提交于 2019-12-02 06:50:28
问题 I have created a dropdown spinner with a background custom image. I have placed the spinner in a linear layout and I have aligned items using weight . Here is my code - XML - <LinearLayout android:id="@+id/csbar" android:windowSoftInputMode="adjustPan" android:paddingTop="8dp" android:paddingBottom="8dp" android:layout_alignParentBottom="true" android:layout_width="match_parent" android:background="#101010" android:layout_height="wrap_content"> <ImageButton android:id="@+id/run" android

Is it possible to smooth a scaled TBitmap in Delphi?

寵の児 提交于 2019-12-01 03:08:59
问题 I am using Stretched=True on a TImage with a 256x256 bitmap. This gets scaled down by 1,2,4 or 8. As expected, text on the bitmap gets more horrible the more I depart from '1'. I notice though that Windows 7 explorer renders a scaled down version of the bitmap 'softer' and more pleasing. Is it possible to 'blur' a TBitmap in this way? 回答1: I suppose you mean Stretched = True on a TImage, not on A TBitmap. Unfortunately TImage has no resamplers built in, when it comes to resizing images in it.

Android action bar with two stretched buttons

天涯浪子 提交于 2019-11-27 18:23:25
Does anybody know how to easily implement an action bar with two stretched buttons? Here is an example of the Google calendar app: Thank you! If you rather have this in the ActionBar for whatever reason, one way to achieve this is by using a custom view on the Action bar. Within you Custom View's layout then worry about setting up the buttons width. Telling the activity to use a custom view for the action bar: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ActionBar ab = getActionBar(); ab

Android action bar with two stretched buttons

梦想的初衷 提交于 2019-11-26 19:24:49
问题 Does anybody know how to easily implement an action bar with two stretched buttons? Here is an example of the Google calendar app: Thank you! 回答1: If you rather have this in the ActionBar for whatever reason, one way to achieve this is by using a custom view on the Action bar. Within you Custom View's layout then worry about setting up the buttons width. Telling the activity to use a custom view for the action bar: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate