首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏iOS开发笔记

    cordova插件-Device Orientation

    添加插件 $ cordova plugin addcordova-plugin-device-orientation 图 13如上则插入成功 插件的使用 Methods navigator.compass.getCurrentHeading

    93860发布于 2018-03-30
  • 来自专栏Android Camera开发

    一篇文章搞懂Camx Camera facing、orientation信息

    本篇文章主要介绍camx框架下,lens相关的facing、orientation信息。 1、android.lens.facing 的值是什么时候写入的,值是由什么来决定的? pitch和yaw决定了facing的值,而roll则决定了orientation的值。 二、roll、pitch、yaw这几个概念该如何理解? sensor-position-pitch = <0>; sensor-position-yaw = <180>; 那我们到现在基本就理清楚了, android.lens.facing 、orientation 我们前面说到 roll决定的是orientation的值,那我们看下camera.java里面关于orientation的定义。 这段文字,基本就很好的解释了角度如何确定的问题。

    2.6K20编辑于 2022-12-20
  • android:orientation=horizontal android:gravity=center_vertical 什么意思

    android:orientation="horizontal" android:gravity="center_vertical" 这两个什么意思? 这两个属性用于控制 LinearLayout 内部子控件的排列方式和对齐方式,具体含义如下:1. android:orientation="horizontal"作用于 LinearLayout 本身,

    30610编辑于 2025-07-26
  • 来自专栏世界第一语言是java

    android8.0采坑 Only fullscreen opaque activities can request orientation

    android8.0采坑 Only fullscreen opaque activities can request orientation 也就是说只有全屏不透明的activity才可以设置方向,既然知道问题所在就好办了

    2.7K10发布于 2018-08-02
  • 来自专栏码农笔录

    android8.0采坑 Only fullscreen opaque activities can request orientation

    android8.0采坑 Only fullscreen opaque activities can request orientation 也就是说只有全屏不透明的activity才可以设置方向,

    1.2K10发布于 2021-10-29
  • 来自专栏林德熙的博客

    win10 uwp 在 ItemsPanelTemplate 里面通过样式绑定 Orientation 显示方向

    如果在后台代码定义了 Orientation 属性想要在 xaml 绑定到 ListView 的样式,可以尝试多创建一个帮助属性,用于在里面绑定 我在后台代码定义了属性 Orientation 请看代码 static readonly DependencyProperty OrientationProperty = DependencyProperty.Register( "Orientation ", typeof(Orientation), typeof(MainPage), new PropertyMetadata(default(Orientation))); public Orientation Orientation { get { return (Orientation) GetValue(OrientationProperty ); } set { SetValue(OrientationProperty, value); } } 我在 xaml 有一个 ListView 准备将 Orientation

    79110编辑于 2022-08-04
  • 来自专栏林德熙的博客

    win10 uwp 在 ItemsPanelTemplate 里面通过样式绑定 Orientation 显示方向

    如果在后台代码定义了 Orientation 属性想要在 xaml 绑定到 ListView 的样式,可以尝试多创建一个帮助属性,用于在里面绑定 我在后台代码定义了属性 Orientation 请看代码 static readonly DependencyProperty OrientationProperty = DependencyProperty.Register( "Orientation ", typeof(Orientation), typeof(MainPage), new PropertyMetadata(default(Orientation))); public Orientation Orientation { get { return (Orientation) GetValue(OrientationProperty ); } set { SetValue(OrientationProperty, value); } } 我在 xaml 有一个 ListView 准备将 Orientation

    1.1K30发布于 2019-03-19
  • 来自专栏鸿蒙开发笔记

    OpenHarmony系统解决方案 - 配置屏幕方向导致开机动画和Launcher显示异常

    发现set orientation时,orientation被设置为8,对应源码含义为AUTO_ROTATION_RESTRICTED。 newOrientation, bool isFromWindow){ WLOGD("set orientation. screen %{public}" PRIu64" orientation newOrientation, bool isFromWindow){ WLOGD("set orientation. screen %{public}" PRIu64" orientation orientation){ if (! orientation >= Orientation::UNSPECIFIED && orientation <= Orientation::REVERSE_HORIZONTAL) ||

    50810编辑于 2024-07-19
  • 来自专栏RTSP/RTMP直播相关

    Android平台GB28181设备接入模块分辨率发生变化怎么办?

    is_need_lock_image_orientation_; if (cur_image_orientation_ >= 0) cur_image_orientation orientation_ : cur_image_orientation_); btnCameraImageOrientationLock.setText(is_need_lock_image_orientation , int rotation) { orientation_ = orientation; if (! is_need_lock_image_orientation_ || cur_image_orientation_ < 0) cur_image_orientation_ orientation_ : cur_image_orientation_); } if (layer_post_thread_ !

    40540编辑于 2022-12-20
  • 来自专栏个人路线

    OpenHarmony/HarmonyOS如何切换横竖屏?

    系统能力: SystemCapability.WindowManager.WindowManager.Core 参数: 参数名 类型 必填 说明 Orientation Orientation 是 窗口显示方向的属性 示例: let orientation = window.Orientation.AUTO_ROTATION; try { let promise = windowClass.setPreferredOrientation (orientation); promise.then(()=> { console.info('Succeeded in setting the window orientation = Window.Orientation.LANDSCAPE; windowClass.setPreferredOrientation(orientation, (err) => { Data: ' + JSON.stringify(data)); } else { //切换成竖屏 let orientation = Window.Orientation.PORTRAIT

    2.5K70编辑于 2023-02-23
  • 来自专栏程思阳的专栏

    Android 屏幕横竖切换详解

    SCREEN_ORIENTATION_UNSPECIFIED 方向未指定 SCREEN_ORIENTATION_LANDSCAPE 方向横屏 SCREEN_ORIENTATION_PORTRAIT 方向竖屏 SCREEN_ORIENTATION_USER 方向用户 SCREEN_ORIENTATION_BEHIND 方向背后 SCREEN_ORIENTATION_SENSOR 方向传感器 SCREEN_ORIENTATION_NOSENSOR 方向没有传感器 SCREEN_ORIENTATION_SENSOR_LANDSCAPE 传感器横向 SCREEN_ORIENTATION_SENSOR_PORTRAIT 传感器竖向 SCREEN_ORIENTATION_REVERSE_LANDSCAPE 反转横向 SCREEN_ORIENTATION_REVERSE_PORTRAIT 反转竖向 SCREEN_ORIENTATION_FULL_SENSOR 全传感器 SCREEN_ORIENTATION_USER_LANDSCAPE 用户横向 SCREEN_ORIENTATION_USER_PORTRAIT 用户竖向 SCREEN_ORIENTATION_FULL_USER

    2.9K30编辑于 2022-01-11
  • 来自专栏程序员开发工具

    Activity横竖屏切换的那些事

    orientation 屏幕方向发生变化——用户旋转了屏幕。 ().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { // 加入竖屏要处理的代码 orientation += 360; } } if (orientation > 225 && orientation < 315) { / /横屏 sensor_flag = false; } else if ((orientation > 315 && orientation < 360) || ( =null){ mAngleChangleListener.onChange(orientation); mLastAngle=orientation;

    2.7K20发布于 2018-09-18
  • 来自专栏鸿蒙开发笔记

    OpenHarmony版本的APP如何切换横竖屏?

    setPreferredOrientationsetPreferredOrientation(orientation: Orientation): Promise<void>设置窗口的显示方向属性,使用 let orientation = window.Orientation.AUTO_ROTATION;try { let promise = windowClass.setPreferredOrientation (orientation); promise.then(()=> { console.info('Succeeded in setting the window orientation = Window.Orientation.LANDSCAPE; windowClass.setPreferredOrientation(orientation, (err) => { Data: ' + JSON.stringify(data)); } else { //切换成竖屏 let orientation = Window.Orientation.PORTRAIT

    45720编辑于 2025-04-27
  • 来自专栏山河木马

    使用JavaScript判断手机是处于横屏还是竖屏(转)

    移动端的浏览器一般都支持window.orientation这个参数,通过这个参数可以判断出手机是处在横屏还是竖屏状态。 从而根据实际需求而执行相应的程序。 //判断手机横竖屏状态: function hengshuping(){ if(window.orientation==180||window.orientation==0){ alert("竖屏状态! } if(window.orientation==90||window.orientation==-90){ alert("横屏状态!") window.orientation == -90) { //ipad、iphone竖屏;Andriod横屏 $("body").attr("class", "landscape"); orientation = 'landscape'; return false; } else if (window.orientation == 0 || window.orientation == 180) { //ipad

    5.3K20发布于 2019-03-05
  • 来自专栏

    用代码旋转屏幕

    ));  7                 Log.d("DEBUG","PORTRAIT  =" + Integer.toString(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ));  8                 if (r == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {  9                     Log.d ("DEBUG", "To " + Integer.toString(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)); 10                      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 11                 } else if (r == (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)); 13                     setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE

    1.8K20发布于 2018-09-12
  • 来自专栏WordPress果酱

    使用 Google Analytics 分析 iPad 横竖屏使用比例

    把下面的代码放到网页的 head 中: function detect_orientation(e){ var orientation =''; var change ='Original'; if (e) change="Change"; switch(window.orientation) { case 0: case 180: // 竖屏 orientation = 'Portrait '; _gaq.push(['_trackEvent', 'Orientation', orientation, change, 1]); break; case -90: case 90: // 横屏幕 orientation = 'Landscape'; _gaq.push(['_trackEvent', 'Orientation', orientation, change , 1]); break; } } detect_orientation(); //检测用户打开网站的时候是横屏还是竖屏幕 window.onorientationchange = detect_orientation

    76220编辑于 2023-04-14
  • 来自专栏菜鸟手记

    Python3 使用pli优化图片,相机或手机拍图片根据exif旋转、纠正方向

    in ExifTags.TAGS.keys(): if ExifTags.TAGS[orientation] == 'Orientation': break exif = _getexif().items()) if exif[orientation] == 3: img = img.rotate(180, expand=True) elif exif[orientation] == 6: img = img.rotate(270, expand=True) elif exif[orientation] in ExifTags.TAGS.keys(): if ExifTags.TAGS[orientation] == 'Orientation': break exif = elif exif[orientation] == 6: img = img.rotate(270, expand=True) elif exif[orientation]

    1.2K30发布于 2020-05-27
  • 来自专栏机器人课程与技术

    浅谈机器人控制与仿真设计----RDS和ROS

    :Y>0.077099</physm:Y> <physm:Z>2</physm:Z> </physm:Position> <physm:Orientation :Y> <physm:Z>-7.260728E-10</physm:Z> <physm:W>1</physm:W> </physm:Orientation /physm:Y> <physm:Z>0</physm:Z> <physm:W>0</physm:W> </physm:Orientation /physm:Y> <physm:Z>0</physm:Z> <physm:W>1</physm:W> </physm:Orientation /physm:Y> <physm:Z>0</physm:Z> </physm:Position> <physm:Orientation

    2K20发布于 2019-01-23
  • 来自专栏【Android开发基础】

    android横竖屏切换问题

    if(this.getResources().getConfiguration().orientation==Configuration.ORIENTATION_LANDSCAPE) {        orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;  //横屏 6.  } else {   7.       orientation = ActivityInfo.SCREEN_ORIENTATION_USER;   3.  orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;   9.      } else {   10.          orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;   11.     }   12.

    3.5K20编辑于 2023-02-10
  • 来自专栏Android知识点总结

    Android自定义控件辅助利器之EventParser

    对象用着感觉挺麻烦 打算自己写一个事件的解析类来辅助事件的分析,功能包括: 1.点击监听:回调-->传出落点(类型PointF) 2.抬起监听:回调-->手指抬起点(类型PointF)、移动方向(类型Orientation float dx, double dir, Orientation orientation) { } }); } @Override public 方向 */ void up(PointF pointF, Orientation orientation); /** * 移动 * * @param 方向 */ void move(double v, float dy, float dx, double dir, Orientation orientation); } 4.事件处理适配器 Orientation orientation) { } }

    44520发布于 2018-12-13
领券