Time of Update: 2018-12-05
這是代碼的,當然我在程式中提供了3個方法,調用不同的方法會彈出不同的alterDialog。 主要的實現是在activity當中。package cn.com.chenzheng_java;import android.app.Activity;import android.app.AlertDialog;import android.content.DialogInterface;import android.content.res.Resources;import
Time of Update: 2018-12-05
你是不是很希望自己的TextView中的文本在遇到電話號碼或者網頁地址的時候,能夠顯示成為一個連結,然後我們一點擊就會進入相應的打電話或者瀏覽器應用呢?如果你的回答是yes,那麼我們就一起看看我這裡的應用吧。代碼如下:布局檔案linkify.xml代碼:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
Time of Update: 2018-12-05
接上篇的 android TraceView使用以及listview 的效能最佳化測試(一)上篇最後面給了我測試用的代碼: 未看到請先瀏覽上一篇:好現在咋門來驗證listView 的神奇,listview主要需要最佳化的就是getView() 這個方法,實現其中convertView 的緩衝最佳化,下面就利用TraceView 測試下listview重用convertView 的區別: 首先啥都不做: public View getView(int position, View
Time of Update: 2018-12-05
http://www.cnblogs.com/shangdahao/archive/2013/05/19/3069092.html Android 在其他線程中更新UI 線程方法一:Activity.runOnUiThread(Runnable )(經驗之道: 這個最好用, 凡是要重新整理頁面的地方,Activity.runOnUiThread( new Runnable() { public void
Time of Update: 2018-12-05
照著別人的代碼寫,總是會出現意想不到的驚喜 <?xml version="1.0"
Time of Update: 2018-12-05
直接上源碼:package com.example.contact;import android.app.Activity;import android.content.ContentResolver;import android.database.Cursor;import android.os.Bundle;import android.provider.ContactsContract;import
Time of Update: 2018-12-05
總結下,免得每次忘1)style類似於css,用來定義View等UI元素的屬性,比如layout_width等,可以在layout的xml中用@style/name來引用2)style中如果要加入自訂屬性,可以在attr中定義,一個attr包括name和format屬性,可以在style中用@attr/name來引用 也可以在attr中定義屬性集合,用declare-styleable標籤定義,這個屬性集合在view的建構函式中用到 public View(Context
Time of Update: 2018-12-05
最近寫了一個自訂布局的Dialog,運行效果如下:然後我想擷取到自訂布局中的EditText控制項,並得到其中的字串,但是使用send_email = (EditText) findViewById(R.id.send_email_dialog_et);並不能擷取到控制項對象,經測試發現send_email對象為null。。。。沒辦法,只好到一個技術群裡問一下別人,很幸運我找到瞭解決方法,關鍵代碼如下:final View layout =
Time of Update: 2018-12-05
以前用2.2 訪問WebService沒有問題,到3.0上訪問出現android.os.NetworkOnMainThreadException找了資料經過實踐,解決方案如下:public void onCreate() { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites()
Time of Update: 2018-12-05
開發人員對Android平板及手機的興趣持續下降 3月21日訊息,據國外媒體報道,IDCData
Time of Update: 2018-12-05
隨著Android系統一代一代的發布,知名大廠基本上都會選擇最新的作業系統代替老舊的版本,但Google近日發布的資料表明,由於某種原因,目前仍然有數百萬人在使用低版本的Android系統。Android 1.5,你還在用嗎?Google提供的資料顯示,目前約有120萬的使用者在使用三年前的Android 1.5作業系統,此外,還有大約750萬的使用者仍然在使用Android
Time of Update: 2018-12-05
1. 安裝 java 6 - sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse" - sudo apt-get update - sudo apt-get install sun-java6-jdk - sudo update-alternatives --config java 2. 安裝其他的程式包 sudo apt-get
Time of Update: 2018-12-05
aes : AES 一種密碼編譯演算法 apache-http : Apache 基金的一個java 版本的 HTTP 操作介面 bison : 文法產生器 bluez : 藍芽的編程介面 bsddiff : BSD diff bzip2 : bzip clearsilver
Time of Update: 2018-12-05
文章目錄 Build Variants Android build target list.make sdk - build the tools that are part of an SDK (adb, fastboot, etc.)make snod - build the system image from the current software binariesmake servicesmake runtimemake
Time of Update: 2018-12-05
1. 什麼是數位簽章?數位簽章就是為你的程式打上一種標記,來作為你自己的標識,當別人看到簽名的時候會知道它是與你相關的2. 為什麼要數位簽章? 最簡單直接的回答:
Time of Update: 2018-12-05
/** * 從檔案解析出Bitmap格式的圖片 * * @param path * @param maxWidth * @param maxHeight * @return */ public static Bitmap decodeFile(String path, int maxWidth, int maxHeight){ BitmapFactory.Options options = new
Time of Update: 2018-12-05
LinearLayout mProgressLayout=new LinearLayout(this); mProgressLayout.setMinimumHeight(30); mProgressLayout.setGravity(Gravity.CENTER); mProgressLayout.setOrientation(LinearLayout.HORIZONTAL); LayoutParams mLayoutParams=new
Time of Update: 2018-12-05
TextView即使捕獲去焦點的情況下,只要設定紅色字型部分就會跑起來馬燈,重要的 android:scrollHorizontally="true" 這個屬性這個其實沒有什麼技術含量,是經驗之談吧。希望能給你帶來協助!<TextView android:id="@+id/channel_name" android:layout_width="125dp"
Time of Update: 2018-12-05
平台是高通的8225,不知道其他平台的會不會有差別。看過mtk6575的,改的方法差不多。修改的地方是frameworks/base/data/sounds/AllAudio.mk。LOCAL_PATH:= frameworks/base/data/soundsPRODUCT_COPY_FILES += \ $(LOCAL_PATH)/bootanimation.zip:system/media/bootanimation.zip
Time of Update: 2018-12-05
大家好,我們這一節講的是Android Preferences 的學習,Preferences 在Android當中被用來記錄應用,以及使用者喜好等等,它可以用來儲存簡單的資料類型,如Int,Double,Boolean等。Preferences中儲存的資料可以理解為Map型。我們通過PreferenceManager以及getDefaultSharedPreferences(Context)來擷取它,比如當我們想獲得整數我們可以用getInt(String key, int