Time of Update: 2018-12-05
file:AndroidManifest.xml <uses-permission android:name="android.permission.RESTART_PACKAGES" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>file:main.javapackage
Time of Update: 2018-12-05
正常的Dialog快顯視窗,當點擊視窗外圍時關閉彈出的視窗,這個在很多彈出式的Activity上很為實用! dialog.xml 快顯視窗的介面布局: <?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"
Time of Update: 2018-12-05
android 如何在對話方塊中擷取edittext中的資料本文來自:http://blog.sina.com.cn/s/blog_86193b540100tulr.html//得到自訂對話方塊 final View DialogView = a .inflate ( R.layout.loand, null); //建立對話方塊 AlertDialog dlg = new AlertDialog.Builder(loand.this)
Time of Update: 2018-12-05
package lyh.Demo1;import java.util.Calendar;import android.app.Activity;import android.os.Bundle;import android.widget.TextView;public class Demo1 extends Activity {private TextView yearText;private TextView monthText;private TextView
Time of Update: 2018-12-05
git擷取Android源碼:1. git clone git://android.git.kernel.org/ + project path.2. mkdir mydroid cd mydroid repo init -u git://android.git.kernel.org/platform/manifest.git repo sync git clone擷取比較大的源碼時, 不能斷點續傳, 比較惱火. 可以使用 git fetch 解決: mkdir common
Time of Update: 2018-12-05
import android.app.Activity;import android.content.Intent;import android.database.Cursor;import android.net.Uri;import android.os.Bundle;import android.provider.ContactsContract;import android.view.View;import android.widget.Button;import
Time of Update: 2018-12-05
adb start-server - ensure that there is a server running adb kill-server - kill the server if it is running Android Debug Bridge version 1.0.26 -d - directs command to the only connected USB
Time of Update: 2018-12-05
一天有個人問到:為什麼我把3530的android系統和主機相連會識別不出呢? 答案如下: 原來android的usb驅動是基於gaeget架構的,比較特殊,不是所有系統都支援的,然後上網查了一下,網上說官方google有驅動android_usb_windows,我立刻上去下載來驅動試試,但...怎麼和結果不一樣呢?(裝不進,暈) 我想了想還是不明白,然後再用萬能的google
Time of Update: 2018-12-05
1.首先在原始碼根目錄(src下)下建立一個名為netconfig.properties的檔案(也可以在其他目錄下)。2.開啟netconfig.properties檔案,在該檔案中添加下列代碼.Java代碼:#該處為注釋 IP=192.168.1.111 PORT=3535 MSG=這是一個很長的字串,<br>我們可以使其換行 \ 一行顯示不下時,<br>可以分行顯示。
Time of Update: 2018-12-05
關於Android ListView組件中android:drawSelectorOnTop含義When set to true, the selector will be drawn over the selecteditem. Otherwise the selector is drawn behind the selected item. Thedefault value is
Time of Update: 2018-12-05
時間:2010-11-10 14:10來源:Javaeye作者:網路 點擊:264次艾米網小編:ContentResolver的使用和技巧.....Android應用程式可以使用檔案或SqlLite資料庫來儲存資料。ContentProvider提供了一種多應用間資料共用的方式,比如:連絡人資訊可以被多個應用程式訪問。ContentProvider是個實現了一組用於提供其他應用程式存取資料的標準方法的類。 應用程式可以在Content Provider中執行如下操作: 查詢資料 修改資料
Time of Update: 2018-12-05
在網上找了很多資料都不全,所以自己寫了個。 廢話就不多說了。 Main.java部分代碼: package com.jli.main;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.widget.Button;import
Time of Update: 2018-12-05
一、SimpleAdapter SimpleAdapter是一個簡單的適配器,可以將待用資料映射到XML檔案中定義好的視圖。你可以指定資料支援的列表如ArrayList組成的Map。在ArrayList中的每個條目對應List中的一行。Maps包含每行資料。你可以指定一個定義了被用於顯示行的視圖XML檔案,通過關鍵字映射到指定的視圖。 建構函式 public SimpleAdapter (Context context, List<? extends Map&
Time of Update: 2018-12-05
m_LinearLayout = new LinearLayout(this);//建立LinearLayout布局對象 m_LinearLayout.setOrientation(LinearLayout.VERTICAL);//設定布局LinearLayout的屬性 m_LinearLayout.setBackgroundColor(android.graphics.Color.BLACK); /*建立ListView對象*/
Time of Update: 2018-12-05
public class WebActivity extends Activity {private WebView m_webView;private String m_strCurURL;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.web);setTitle(R.string.app_title)
Time of Update: 2018-12-05
在Windows安裝Cygwin設定Windows PATH: <PATH>\Cygwin\bin;<PATH>\android-sdk-windows\platform-tools;<PATH>\android-sdk-windows\tools;<PATH>\android-ndk-r6;<PATH>\android-ndk-r6\toolchains\x86-4.4.3\prebuilt\windows\bin設定Windows
Time of Update: 2018-12-05
像android中的鬧鐘程式,當我們長按一個鬧鐘時,會彈出一個contextMenu,然後我們可以選擇刪除菜單刪除這個鬧鐘。而setOnCreateContextMenuListener(this)這個方法是吧操作功能表添加給這個listview,所以當我們長按這個listview是會出現這個菜單,但是我們怎麼知道使用者實際長按的是listview中的哪一行資料了,這裡我們用到了AdapterContextMenuInfo,這個類可以協助我們定位使用者實際按的是那條資料。我的例子是通過操作功能表
Time of Update: 2018-12-05
這個是我在csdn裡面寫的第一篇文章,再加上我剛參加工作不久,是一個真真的新手,所以還望大家多多指導。這裡要分享的是在一個listview中添加兩個點擊事件的解決辦法,效果就像android
Time of Update: 2018-12-05
Android XMPP Service (Google Talk) + Google Map == Follow Me 分類:Mobile2007/11/27 10:22我在 Android SDK 上寫了一個簡單的程式 (姑且把她叫 Follow Me),來測試 Android 的 XMPP Services (Google Talk) & Google Map 整合,我希望可以透過 Google Talk,來追蹤 Contact Lists 現在的位置及互相通訊。例如可以透過
Time of Update: 2018-12-05
自訂Activity間的切換動畫2011-05-31 18:33:50 Android中預設的2個Activity間的切換是左右形式的,你是否已經看的厭煩,或者覺得他不夠個性,Android中提供了一種方法,可以自訂這個動畫效果;先看下產生動畫效果主要是這行代碼 overridePendingTransition(R.anim.scale, R.anim.alpha); 看代碼部分 :1. 自訂2個Activity 和 2 動畫效果 淡入淡出效果 R.anim.alpha <?