Time of Update: 2015-07-11
標籤:開發語言 移動遊戲 分析 移動互連網 Android 的發展確實太快了,每年的都有很多新東西出現,想要覆蓋所有新東西感覺也不太可能,我這裡主要說一下主要的 Android 的主要新技術發展,其實瞭解 Android 的發展趨勢,可能對開發人員更有協助。開發工具Android Studio: Google 官方放棄 Eclipse 和 Android
Time of Update: 2015-07-11
標籤:非常經典的劃分數問題,即相當於把m個物體分成至多n組,求出分組總數。【思路】目前狀態dp[i][j]表示將i個物體分成至多j組的分組總數。對於目前狀態,有以下兩種情形:(1)j組中有組為空白,則這種情況下分組總數相當於將i個物體分成至多j-1組。即dp[i][j-1]。(2)j組中沒有組為空白,則每一組至少有一個物體,這種情況下分組總數相當於將每一組取出一個物體後的分組數,再在每一組中添加一個物體。即dp[i-j][j]值得注意的是,第二種情況的分組條件為i>=j。所以,dp[i][
Time of Update: 2015-07-12
標籤:事件處理響應者對象在iOS中不是任何對象都能處理事件,只有繼承了UIResponder的對象才能接收並處理事件。我們稱之為“響應者對象”UIApplication、UIViewController、UIView都繼承自UIResponder,因此它們都是響應者對象,都能夠接收並處理事件UIResponder內部提供了以下方法來處理事件這些類可以覆蓋下列幾個方法處理不同的觸摸事件 ```objc
Time of Update: 2015-07-11
標籤:leetcode42 Trapping Rain Water連結:https://leetcode.com/problems/trapping-rain-water/ 問題描述: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For
Time of Update: 2015-07-11
標籤:1.由於項目的需要,我今天學習了新手的引導,接下我來說下新手引導的使用方法:(在程式中運行一次)接下來是實現代碼:在AppDelegate.m 的代碼: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIViewController *root;
Time of Update: 2015-07-12
標籤:1.靜態註冊。在manifest中註冊。1 <receiver android:name="com.exce.learnbroadcastreceiver.MyReceiver"></receiver>然後在activity中使用sendBroadcast(Intent)方法。其中參數是Intent.1 Intent intent=new Intent(this,MyReceiver.class);2 intent.putExtra("data", "exer");
Time of Update: 2015-07-11
標籤:相對布局和線性布局的結合的例子<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <!-- 頂部 --> <RelativeLayout
Time of Update: 2015-07-10
標籤:布局 android 4.0 android FilterFlowLayout含有過濾功能的流式布局, 參考FlowLayout可以去除寬度不在範圍(比例或真實值)內的子view可以設定最大行數可以添加組件間水平間距可以添加行間距系統要求Android 4.0以上快速使用<me.codeboy.android.lib.FilterFlowLayout xmlns:
Time of Update: 2015-07-10
標籤:mvc 資料 結構 ios 模型概念 專門用來存放資料的對象特點 一般直接繼承自NSObject在.h檔案中聲明一些用來存放資料的屬性模型定義樣本@interface Shop : NSObject/** 名字 */@property (nonatomic, strong) NSString *name;/** 表徵圖 */@property
Time of Update: 2015-07-10
標籤:1. UINavigationController提供的功能導航控制器提供在不同頁面之間的導航功能, 包括:pushback.統一的導覽列.導航的手勢(側滑後退)統一的工具列導航控制器導航控制器維護一個堆棧結構. 一層一層.入棧操作對應push, 但是不會銷毀之底部的控制器出棧操作對應back, 會銷毀頂部的控制器(減少一個引用, 如果你想保留也可以)back操作會很快, 因為不需要建立和載入視圖.iOS架構-UINavigationController那些事
Time of Update: 2015-07-12
標籤: /** * 判斷事件是否在控制項中 * * @param view * @param ev * @return * @see http://m.blog.csdn.net/blog/aygxylxk/8950268 */public static boolean inRangeOfView(View view, MotionEvent ev) { int[] location = new int[2];
Time of Update: 2015-07-11
標籤:在Android5.0以前可以通過隱式Intent方式啟動其他App的Service,就跟Activity啟動隱式Intent一樣的。但是在5.0以後,只能使用顯示的Intent方式啟動了。啟動其他App的Service,需要用到Intent的setComponent()方法。該方法需要傳入ComponentName component 這個參數。參數的解釋:component, The name of the application component
Time of Update: 2015-07-12
標籤: 我說的這種方法是利用Android中的service來開啟,也就是進去的時候就播放出,退出就停止。 首先,在AndroidManifest中的application節點下添加:<activity
Time of Update: 2015-07-12
標籤:類比延時private class GetDataTask extends AsyncTask<Void, Void, String[]> { @Override protected String[] doInBackground(Void... params) { // Simulates a background job. try { Thread.sleep(1000); } catch
Time of Update: 2015-07-11
標籤:今天周六,離職在家,複習了一下多線程的一些知識然後寫了一個簡單的倒計時程式:以下是我的activity_main的布局檔案: 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4
Time of Update: 2015-07-12
標籤:android animation drawable 幀動畫 Android-幀動畫 一 幀動畫 又叫做Drawable Animation,就是不同對象之間轉換事件比較快形成的動畫,也是動畫片的原理二 話不多說,看Demo 下面例子是實現4張圖片的切換動畫效果,比較簡單 1,在drawable中定義4張圖片的xml以及過渡時間<?xml
Time of Update: 2015-07-10
標籤:android studio 對話方塊 android 圓角 模糊
Time of Update: 2015-07-11
標籤:轉自:http://blog.csdn.net/zengyangtech/article/details/7019439 Android PDF 閱讀器 http://sourceforge.net/projects/andpdf/files/ 個人記賬工具 OnMyMeans http://sourceforge.net/projects/onmymeans/develop Android電池監控 Android Battery Dog
Time of Update: 2015-07-12
標籤:andriod中如果引入jar包的方式不對就會出現一些奇怪的錯誤。工作的時候恰好有一個jar包需要調用,結果用了很長時間才解決出現的bug。剛開始是這樣引用的(eclipse):右鍵工程,Build path,java build path,選擇libraries,在右邊的按鈕中點擊“Add External JARs”,然後選擇合適的jar包(大部分人應該會這樣做).結果控制台立刻報錯:conversion to dalvik format failed with error
Time of Update: 2015-07-11
標籤:periscope自製狂贊飄桃心國外的IOS app“periscope”非常的火,觀看手機ApsaraVideo for Live的時候,點擊螢幕任何一個地方,螢幕右下角就能飄出各種顏色的桃心,效果非常的炫!為此我自製了一個仿periscope桃心的代碼:- (void) StartLittleHeartShow{ // 構造一個小桃心的UIImageView,其中桃心的顏色可以隨機變化 float