如果把手机屏幕横过来后Activity生命周期会发生变化,会销毁当前的Activity,重新建立Activity,如果不想这样变化 需要在清单文件activity里配置android:configChanges="keyboardHidden|orientation|screenSize"想让屏幕....
分类:
其他好文 时间:
2015-10-11 18:05:14
阅读次数:
168
手动创建layout布局文件,并创建元素,如:<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/button..
分类:
其他好文 时间:
2015-10-09 00:52:24
阅读次数:
203
传感器类型:方向、加速度(重力)、光线、磁场、距离(临近性)、温度等。 方向传感器: Sensor.TYPE_ORIENTATION 加速度(重力)传感器: Sensor.TYPE_ACCELEROMETER 光线传感器: Sensor.TYPE_LIGHT 磁场传感器: Sensor.TYPE_M...
分类:
其他好文 时间:
2015-09-30 11:06:22
阅读次数:
239
{
????CGSize?imageSize?=?CGSizeZero;
????
????UIInterfaceOrientation?orientation?=?[UIApplication?sharedApplication].statusBarOrientation;
????if?(UIInterfaceOrientationIsPo...
分类:
移动开发 时间:
2015-09-26 22:46:56
阅读次数:
358
转屏时,配置了android:configChanges="keyboardHidden|orientation" 还是会调用oncreate ,原来是因为没有配置screensize属性导致。 参考:http://blog.csdn.net/huiguixian/article/details/8071821 在以前的版本...
分类:
移动开发 时间:
2015-09-26 21:21:28
阅读次数:
743
function readDeviceOrientation() { if (Math.abs(window.orientation) === 90) { // Landscape alert...
分类:
移动开发 时间:
2015-09-25 08:26:56
阅读次数:
150
RadioGroup RadioButton的集合,提供多选一的机制 属性: android:orientation="horizontal/vertical" vertical 垂直排布 horizontal 水平排布 决定当前RadioGroup中RadioB...
分类:
移动开发 时间:
2015-09-22 18:10:20
阅读次数:
245
布局可以套用布局常用布局 LinearLayout,RelativeLayoutLinearLayout 线性布局 包含的子控件将以横向或竖向的方式排列。LinearLayout属性: android:orientation="vertical" 该属性决定他子类控件的排布方式(vertic...
分类:
移动开发 时间:
2015-09-22 18:05:51
阅读次数:
249
RadioGroup设置orientation="vertical"竖向单列显示RadioGroup设置orientation="horizontal"横向单行显示如何实现多行多列RadioButton呢?step1:重写RadioGroup类package com.hz.w504_sing_com...
分类:
移动开发 时间:
2015-09-22 16:10:42
阅读次数:
681
referece to : http://blog.csdn.net/mybook1122/article/details/24978025这个网上搜索,很多结果都是:AndroidManifest.xmlandroid:configChanges="keyboardHidden|orientati...
分类:
移动开发 时间:
2015-09-21 12:11:32
阅读次数:
176