// 设置开始页面图片 // 在设置书签的时候可以显示好看的图标 // 肖像模式样式<link rel="stylesheet" media="all and (orientation:landscape)"href="landscape.css" // 风景模式样式//竖屏时使用的样式...
分类:
移动开发 时间:
2015-08-06 13:11:44
阅读次数:
123
怎样设置Activity只有竖屏模式?在Android Manifest 文件中添加如下代码:android:configChanges="orientation|keyboardHidden|screenSize"
分类:
移动开发 时间:
2015-08-05 18:02:15
阅读次数:
130
前情提要:在LinearLayout中有两个子元素,LinearLayout的orientation是horizontal。需要让第一个元素居左,第二个元素居右
1、LinearLayout中默认的gravity属性是居左,所以默认两个子元素都是居左显示
2、设置第一个元素的layout_weight属性android:layout_weight="1",第二个元素的该属性不需要设置
...
分类:
其他好文 时间:
2015-08-05 10:32:38
阅读次数:
138
从Android 3.2(API 13),在设置Activity的android:configChanges="orientation|keyboardHidden"后,还是一样会重新调用各个生命周期的。因为screen size也开始跟着设备的横竖切换而改变。所以,在AndroidManifest.xml里设置的MiniSdkVersion和 TargetSdkVersion属性大于等于13的情...
分类:
其他好文 时间:
2015-07-31 23:33:07
阅读次数:
179
在AndroidMainfest页面里声明页面跳转是这样。
android:name="com.activity.Testupdate"
android:theme="@style/Transparent"
android:configChanges="keyboardHidden|orientation|...
分类:
其他好文 时间:
2015-07-31 14:51:31
阅读次数:
107
示例代码:
import scala.swing.SimpleSwingApplication
import scala.swing.MainFrame
import scala.swing.Button
import scala.swing.Label
import scala.swing.Orientation
import scala.swing.BoxPanel
import s...
分类:
其他好文 时间:
2015-07-30 00:44:31
阅读次数:
161
设备中的三自由度Orientation Sensor就是一个可以识别设备相对于地面,绕x、y、z轴转动角度的感应器(自己的理解,不够严谨)。智能手机,平板电脑有了它,可以实现很多好玩的应用,比如说指南针等。我们可以用一个磁场感应器(magnetic sensor)来实现。磁场感应器是用来测量磁场感应...
分类:
移动开发 时间:
2015-07-29 15:33:35
阅读次数:
161
示例代码:
package com.dt.scala.gui
import scala.swing.SimpleSwingApplication
import scala.swing.MainFrame
import scala.swing.Button
import scala.swing.Label
import scala.swing.Orientation
import scala.s...
分类:
其他好文 时间:
2015-07-28 23:21:05
阅读次数:
556
1.linearlayout布局,android:orientation属性为vertical时,则android:layout_gravity只在水平方向上有效。反之,android:orientation属性为horizontal时,那么android:layout_gravity属性只在垂直方...
分类:
移动开发 时间:
2015-07-28 12:48:46
阅读次数:
121
/* Write a program to print a histogram of the lengths of words in its input.
It is easy to draw the histogram with the bars horizontal; a vertical
orientation is more challenging. */
#includ...
分类:
其他好文 时间:
2015-07-25 13:52:49
阅读次数:
128