- 浏览: 281745 次
- 性别:
- 来自: 广州
最新评论
-
xianwubiao:
坑爹。。。。。
IOS之简单选择器UIPickerView(省份+城市) -
yanransysu:
为啥结果没有显示图片嘞,我都已经把你共享的文件给放进去了?
IOS之集合视图UICollectionView -
ajxjwha:
获取的总是空,为什么?!
IOS之简单选择器UIPickerView(省份+城市) -
如果宅:
附件下载下来是图片!
IOS之集合视图UICollectionView -
ikrboy:
小红星凯 写道找不到pickview 那个协议怎么搞?步骤写得 ...
IOS之简单选择器UIPickerView(省份+城市)
文章列表
IOS之UI状态保持与恢复
- 博客分类:
- IOS基础开发
为了实现点击Home键使程序退出,可以在设置属性*-info.plist修改Application does not run in background属性值为YES
为实现UI的状态保持和恢复,包括APP层面和storyboard层面,首要条件就是需要在AppDelegate.m文件添加以下两个方法。
- (BOOL)application:(UIApplication *)application shouldSaveApplicationState:(NSCoder *)coder {
return YES;
}
- (BOOL)application:(UIA ...
1.修改AppDelegate.m如下
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"%@",@"应用启动并进行初始化");
return YES;
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
NSLog(@"%@&qu ...
public class PhotoChoose extends Activity {
private Button myButton01;
private ImageView myImageView01;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.photo_choose);
myImageView01 = (ImageView) findViewById(R.id.i ...
ImageView自由移动
- 博客分类:
- Android动画
第一种:根据点击位置确定图片的左上角
@SuppressWarnings("deprecation")
public class MoveImage extends Activity {
private ImageView mImageView01;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
...
public class FadeInAndOut extends Activity {
private int intCounter = 0;
private Handler mHandler = new Handler();
private ImageView mImageView01;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fade_in_out);
...
private ImageView imageView1;
protected static final int CONTEXT_ITEM1 = Menu.FIRST;
protected static final int CONTEXT_ITEM2 = Menu.FIRST + 1;
protected static final int CONTEXT_ITEM3 = Menu.FIRST + 2;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanc ...
private GestureLibrary gesLib;
private GestureOverlayView gesOverlay;
private String gesPath;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.get_gesture);
/* 查看SDCard是否存在 */
if (!Environment.MEDIA_MOUNTED.equal ...
public class GetPosition extends Activity {
private TextView TextView01;
private SensorManager mSensorManager;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.get_position);
TextView01 = (TextView) findViewById(R.id.tex ...
添加权限
<uses-permission android:name="android.permission.BATTERY_STATS"></uses-permission>
public class BatteryWidget extends AppWidgetProvider {
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
super.onUpdate(con ...
public class BeginFromBoot extends Activity {
private TextView mTextView01;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.begin_from_boot);
mTextView01 = (TextView) findViewById(R.id.myTextView1);
mTextView01.setTex ...
BroadcastReceiver捕捉到信息后关闭服务
public class ServiceSendCast extends Activity {
/* 建立自定义mServiceReceiver对象 */
private MyServiceReceiver mReceiver01;
private TextView mTextView01;
private Button mButton01, mButton02;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(sav ...
添加权限
<uses-permission
android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission
android:name="android.permission.RECEIVE_SMS"></uses-permission>
public class SmsSendState extends Activity {
private mServiceReceive ...
添加权限
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />
private TextView mTextView01;
private TextView mTextView03;
private EditText mEditText1;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
set ...
添加震动权限
<uses-permission
android:name="android.permission.VIBRATE" />
public class TurnSilent extends Activity {
private SensorManager mSensorManager01;
private TextView mTextView01;
private int audioManagerMode;
public void onCreate(Bundle savedInstanceStat ...
添加权限
<uses-permission
android:name="android.permission.SET_WALLPAPER"></uses-permission>
三部分
1.DailyWallpaper.java
2.DailyReceiver.java(BroadcastReceiver)
3.ChangeBgImage.java
DailyWallpaper.java
public class DailyWallpaper extends Activity {
private Bu ...