Time of Update: 2018-12-03
android-uitableview是一個仿製Iphone UI的view,介面效果不錯。Defining your layout查看源碼列印?1<br.com.dina.ui.widget.UITableView2android:id="@+id/tableView"3style="@style/UITableView"/>Working on your activity查看源碼列印?01public class Example1Activity extendsActivity
Time of Update: 2018-12-03
Socket(通訊端)是一種通訊機制,可以實現單機或跨網路進行通訊,其建立需要明確的區分C(用戶端)/S(伺服器端),支援多個用戶端串連到同一個伺服器。有兩種傳輸模式:1)、連線導向的傳輸:基於TCP協議,可靠性高,但效率低;2)、面向不需連線的傳輸:基於UDP協議,可靠性低,但效率高;
Time of Update: 2018-12-03
在實際的工作中經常需要根據美工的設計來改變一些控制項的顏色,式樣,以及背景圖片,下面和大家共同探討一下在Android中如何自訂SeekBar的背景顏色,進度條的顏色,以及滑塊的圖片首先在layout檔案夾中的main.xml內容如下 1. <?xml version="1.0" encoding="utf-8"?> 2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
Time of Update: 2018-12-03
先看效果主要是寫一個 color selector在res/建一個檔案夾取名colorres/color/color_radiobutton.xml<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="
Time of Update: 2018-12-03
1. Android是什嗎?Android 是Google開發的基於Linux平台的開源手機作業系統。它包括作業系統、使用者介面和應用程式 —— 行動電話工作所需的全部軟體,而且不存在任何以往阻礙移動產業創新的專有權障礙。Google與開放手機聯盟合作開發了 Android,這個聯盟由包括中國移動、摩托羅拉、高通、宏達和 T-Mobile 在內的 30 多家技術和無線應用的領軍企業組成。Android
Time of Update: 2018-12-03
首先是layout中的布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="horizontal" android:layout_width="fill_parent"android:layout_height="wrap_content"
Time of Update: 2018-12-03
Android 軟體設計介面時,TextView文字過多,顯示不全,怎麼辦?我們可以為Textview添加捲軸。<TextView android:id="@+id/bus_detail_content" android:layout_width="fill_parent" android:layout_height="fill_parent"
Time of Update: 2018-12-03
1.下載 Android Screen Monitorhttp://code.google.com/p/android-screen-monitor/ (1) 下載 ASM_2_30.zip 並解壓縮, 取得 asm.jar(2) 將 asm.jar 複製到D:\android-sdk\platform-tools目錄下 2. 執行 Android Screen Monitor win+R ==》 運行cmd控制台進入D:\android-sdk\platform-tools 執行下面命令:&
Time of Update: 2018-12-03
Android允許我們定義自己的的ContentProvider對象來共用資料,練練手,簡單來實現一下。要使用ContentProvider來操作資料,必須要有儲存資料的場所。可以使用檔案或SQLite資料庫的方式來儲存資料,通常使用SQLite資料庫。1,建立一個資料庫協助類,歸根結底都是它在操作資料庫。代碼如下:package com.njue;import android.content.Context;import
Time of Update: 2018-12-03
Android跟伺服器互動資料,有時資料量大時,就需要以xml形式的互動資料。這裡來實現伺服器給Android用戶端發送xml資料,Android用戶端解析。伺服器端我使用dom4j第三方包來組織xml資料,大家可自行百度下載。而Android用戶端則使用 XmlPullParser來解析xml資料。 伺服器端代碼: package servlet;import java.io.IOException;import java.io.PrintWriter;import
Time of Update: 2018-12-03
Android 1.5、1.6android.intent.category.ALTERNATIVE android.intent.category.BROWSABLE android.intent.category.DEFAULTandroid.intent.category.DEVELOPMENT_PREFERENCE android.intent.category.EMBED android.intent.category.HOME
Time of Update: 2018-12-03
1.在onCreate方法中:1.1調用getPreferredCameraId()方法,在此方法中new了ComboPreferences對象,此對象用於管理程式中產生的以包命名的設定檔,擷取此對象後初始化了一些配置。接著從設定檔中讀取照相機id mCameraId,
Time of Update: 2018-12-03
從網站上,下載了一個3D 360度全景的demo。在此demo中,需要匯入一個PanoramaGL.jar的第三方類庫,所以必須匯入,那麼怎麼匯入呢?必須使用UserLibraries的方式來進行匯入,以防APK與JAR檔案沒有綁定到一起。即步驟為右鍵工程,-1、Build path,-2、java build path,選擇libraries-3、在右邊的按鈕中點擊“Add Library”-4、選擇“User library”,點擊“下一步”-5、點擊“User librarys”按鈕-6、
Time of Update: 2018-12-03
昨天再做android的3D圖360度全景時,從http://code.google.com/p/panoramagl-android/downloads/list網站下載了現有的demo,匯入到Eclipse中後選擇了相應的API後,紅叉的項目錯誤沒有了。
Time of Update: 2018-12-03
AlertDialog dialog = builder.setTitle("訊息列表").setView(layout).create();dialog.show();//設定視窗的大小dialog.getWindow().setLayout(300, 200);dialog.show();一定要放在dialog.getWindow().setLayout(300, 200);的前面,否則不起作用。網上有一種方法是WindowManager.LayoutParams params =
Time of Update: 2018-12-03
這裡介紹下handler中除了sendMessage外還有post的方法發送和處理訊息;介紹幾個方法:final boolean post(Runnable r)final boolean postAtFrontOfQueue(Runnable r)final boolean postAtTime(Runnable r, Object token, long uptimeMillis)final boolean postAtTime(Runnable r, long
Time of Update: 2018-12-03
package android.test;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.widget.Button;public class Main extends Activity {private Button m_sendEmailBtn; /** Called when the
Time of Update: 2018-12-03
1. AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.test" android:versionCode="1" android:versionName="1.0"> <uses-sdk
Time of Update: 2018-12-03
1. php中echo json_encode($data); 2. Android中package android.test;import java.io.BufferedReader;import java.io.InputStreamReader;import org.apache.http.HttpResponse;import org.apache.http.client.HttpClient;import org.apache.http.client.methods.HttpGet;
Time of Update: 2018-12-03
1. Main.xml<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"><ListView