Time of Update: 2016-01-26
標籤:public final boolean isAdded()如果該Fragment對象被添加到了它的Activity中,那麼它返回true,否則返回false。public final boolean isDetached()如果該Fragment已經明確的從UI中分離,那麼它返回true。也就是說,在該Fragment對象上使用FragmentTransaction.detach(Fragment)方法。該方法在API Level 13中被引入。public final boolean
Time of Update: 2016-01-26
標籤:安卓錯誤記錄檔分析1. java.lang.nullpointerexception這個異常大家肯定都經常遇到,異常的解釋是"程式遇上了null 指標",簡單地說就是調用了未經初始化的對象或者是不存在的對象,這個錯誤經常出現在建立圖片,調用數組這些操作中,比片未經初始化,或者圖片建立時的路徑錯誤等等。對數組操作中出現null
Time of Update: 2016-01-26
標籤:運行時許可權介紹Android
Time of Update: 2016-01-26
標籤://在-(void)viewWillAppear:(BOOL)animated方法中添加返回按鈕 //返回按鈕 UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom]; leftButton.frame=CGRectMake(0, 0, 60, 25); [leftButton
Time of Update: 2016-01-26
標籤:寫Android測試案例有三要素,一是我們用的“安卓模擬器device”(用來顯示UI),二是“uiautomatorviewer.bat”(用來定位UI上的元素),三是“Robotium”中提供的類(用來與UI元素進行互動)。在寫好Android的測試案例後,可通過Android JUnit Test批量運行測試代碼。一共分四步——第一步:寫一個suite類(suite中包
Time of Update: 2016-01-26
標籤: AlertDialog.Builder builder = new AlertDialog.Builder(_context); builder.setTitle("溫馨提示").setMessage("您的賬戶被鎖定,請聯絡閉門!") .setPositiveButton("確定", new DialogInterface.OnClickListener() {
Time of Update: 2016-01-26
標籤:為什麼你的 App 沒人用?請按這8條逐一對照Kamo Asatryan 可能是這個世界上關注創新生態系統最多的一些人之一,他觀察過數百個移動端 App,深入思考過它們的運行機制,並為它們的快速增長提供過切實有效建議。目前,他是 Prime 公司的 CEO,這家新興公司專門負責改善移動端 App 的使用體驗。(這位就是 Kamo Asatryan )因此,如果你正負責開發一款移動端的 App,請仔細閱讀以下內容。對於高速增長中的移動端 App 來說,他們應該注意以下幾點:1、
Time of Update: 2016-01-26
標籤:項目中用到彈出Acitivity來獲得使用者輸入 所以用到 onActivityResult()方法接受使用者輸入奇怪問題 startActivityForResult() 後直接調用 onActivityResult() 開發人員都知道,可以通過使用 startActivityForResult() 和 onActivityResult() 方法來傳遞或接收參數。然而在項目中,還沒等到被調用的 Activity 返回,onActivityResult(
Time of Update: 2016-01-26
標籤:快速探索使用快速探索,即使你的app不能開啟文檔,使用者也可以通過你的app預覽一個文檔。比如說,你也許會允許使用者預覽他們從網頁下載或者從其他資源擷取的文檔。查看Document Interaction Programming Topics for
Time of Update: 2016-01-26
標籤:1、計時器的使用 [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(flyAction) userInfo:nil repeats:YES]; 2、隨機數的使用arc4random() 3、UIWindow部分代碼(xib)//UIScreenCGRect rect = [UIScreen
Time of Update: 2016-01-26
標籤:iOS學習day1UIwindow->UIviewcontrol->UIviewUIscreen 寫項目方式:1.storyBoard2.xib檔案 3.純程式碼蘋果手機尺寸/* iPhone4 3.5寸 不是retina屏 32位系統 320×480 iPhone4s 3.5寸 retina屏 32位系統 64
Time of Update: 2016-01-26
標籤:開發準備中http://www.cnblogs.com/dev2007/p/4059829.html主要介紹了基礎環境的搭建,開發工具主要是Eclipse,由於Android Studio使用越來越廣,此篇針對Android Studio相關簡要說明。首先推薦網站1:http://www.androiddevtools.cn/ 幾乎android相關工具都能在上面下載。網站2:http://www.android-studio.org/ Android Studio的中文社區1.
Time of Update: 2016-01-25
標籤:代碼如下: public Bitmap transform(Bitmap source) { int size = Math.min(source.getWidth(), source.getHeight()); int x = (source.getWidth() - size) / 2; int y = (source.getHeight() - size) / 2; Bitmap squaredBitmap =
Time of Update: 2016-01-25
標籤:在移動端h5頁面;尤其那些全螢幕的盒展示切換頁面,當使用者無意中將手指滑到了 瀏覽器地址攔以上(中國移動這快地區);此時,手指已經離開螢幕了,但是ios上無法監聽到touchend 事件;toucend監聽的回呼函數事件直接失效;該問題只有在實機 上才有;模擬器上,安卓暫時沒發現; touchcancel取消事件沒啥用; 百度了好久。問了好多人沒找到辦法;後來突然想到解決辦法;move時候 碰到地址攔;直接調用end的回呼函數,
Time of Update: 2016-01-25
標籤:Do you wanna have some toasts ?jquery-toastmessage-plugin is a JQuery plugin which provides android-like notification messages. The toasted messages arriving on the screen in a seamless and natural way. They may or may not disrupt the user and
Time of Update: 2016-01-25
標籤:standard:預設的模式,每次啟動會新建立一個activity對象singleTop:在當前任務棧中,判斷棧頂是否為當前的activity,如果是,就直接使用,如果不是,就會建立新的activity放入棧頂singleTask:在當前任務棧中,判斷棧裡是否存在當前的activity,如果不存在,就會建立新的activity入棧,如果存在,會把該activity之上所有activity清理出棧,顯示當前activitysingleInstance:新建立一個任務棧,放入新建立的activ
Time of Update: 2016-01-25
標籤:前言: 現在Android studio版本已經去到2.0(我暫時用著開發人員版本)了,但是還是和以前的版本一樣卡。 (因為我用了很多第三方的UI控制項,導致在Android studio build一個項目非常漫長,大約改一個字元需要兩三分鐘,最長試過5分鐘呢。 不過在Eclipse的話,最多隻需要半分鐘就Build 到在手機,大大減少編譯項目時間,有助於開發調試。)所以我還是用著Android studio來開發,Eclipse
Time of Update: 2016-01-25
標籤://// ViewController.m// text//// Created by 李東旭 on 16/1/22.// Copyright © 2016年 李東旭. All rights reserved.//#import <UIKit/UIKit.h>#import "ViewController.h"@interface ViewController ()@end@implementation ViewController-
Time of Update: 2016-01-25
標籤:用於自動補全內容適應器可用於顯示多行內容 1 package com.supermario.autocompletedemo; 2 import android.app.Activity; 3 import android.os.Bundle; 4 import android.widget.ArrayAdapter; 5 import android.widget.AutoCompleteTextView; 6 public class AutoCompleteDemo extends
Time of Update: 2016-01-25
標籤:一、LINEARLAYOUT 線性布局 android:layout_width=""match_parent 適應父控制項 fill_parent 填充父控制項 wrap_content 內容包裹 android:orientation="" 方向選擇 vertical 豎向 horizontal 橫向 android:laytou_weight="" 權重二、FRAMELAYOU 架構布局三、RELATIVELAYOUT 相對布局