對android項目反向工程的方法

拿到android項目,是一個apk的包。這裡麵包含編譯後的代碼和資源檔兩部分。其中資源檔的反向工程,可以參見簡單分析apk檔案中的資訊。而編譯後的代碼部分,需要藉助兩個工具:dex2jar,用於將dex檔案轉換為jar檔案; jd-gui,將jar檔案反向工程為java代碼。  dex2jar的連結在:http://code.google.com/p/dex2jar/下載然後解壓縮,可以直接在windows下或者linux下運行。命令參數比較簡單:./dex2jar.sh

Android Button Highlight

In android, we can highlight the button through custom images. Here is a example that will give you about how to set a image when the button is focused, pressed and focused pressed. we can set each image for each stage.Example for Android Button

android各種觸摸事件的處理,touchEvent

Android裡有兩個類 android.view.GestureDetector android.view.GestureDetector.SimpleOnGestureListener (另外android.widget.Gallery好像是更牛x的OnGestureListener ) 1) 建立一個類繼承SimpleOnGestureListener,HahaGestureDetectorListener 可以實現以下event事件。 boolean 

Android 擷取系統中所有安裝的APK的資訊

private List<ResolveInfo> mApps; private void loadApps() { Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); mApps =

android emulator 命令詳解

在命令列輸入: emulator -help,即可顯示emulator支援的所有命令。Android Emulator usage:    emulator [options] [-qemu args]   options:     -sysdir <dir>                 在目錄<dir>中搜尋system.img     -system <file>                讀取system.img檔案<file>   

Android判斷是否有可用網路和判斷WIFI是否ON

1. 判斷是否有可用網路 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ConnectivityManager mConnectivityManager = (ConnectivityManager)

Android 自訂 LinearLayout

private class SpeechView extends LinearLayout { private TextView mTitle; private TextView mDialogue;public SpeechView(Context context, String title, String words) { super(context); this.setOrientation(VERTICAL);

android中的後退鍵——onBackPressed()的使用

很多網友不明白如何在Android平台上捕獲Back鍵的事件,Back鍵是手機上的後退鍵,一般的軟體不捕獲相關資訊可能導致你的程式被切換到後台,而回到案頭的尷尬情況,在Android上有兩種方法來擷取該按鈕的事件。  1.直接擷取按鈕按下事件,此方法相容Android 1.0到Android 2.1 也是常規方法,直接重寫Activity的onKeyDown方法即可,代碼如下:@Overridepublic boolean onKeyDown(int keyCode, KeyEvent

Android 只開啟一個Activity執行個體

在一個Activity中,多次調用startActivity()來啟動另一個Activity,要想只產生一個Activity執行個體,方法有兩種。 方法一:設定起動模式 一個Activity有四種啟動模式:standard, singleTop, singleTask, singleInstance。 standard: 標準模式,一調用startActivity()方法就會產生一個新的執行個體。 singleTop: 如果已經有一個執行個體位於Activity棧的頂部時,就不產生新的執行個體,

android 1.5中模擬器如果掛載sdcard

1、開啟命令視窗      點擊“開始”--->"運行"----> 輸入cmd,斷行符號21、進入android sdk 1.5的目錄,輸入如下的命令列:      mksdcard 100M D:/sdcardxy.img      其中,100M是sdcard的大小, D:/sdcardxy.img 是sdcard在硬碟中的存放位置3、在當前的路徑下輸入如下的命令啟動模擬器並掛載剛配置好的sdcard:     emulator -sdcard D:/sdcardxy.img -

Android out of memory應注意的地方

1.大量查詢資料庫時cursor沒有關閉錯誤寫法: Cursor cursor = getContentResolver().query( ); if(cursor != null){       cursor.moveTOFirst();       while(!cursor.isAfterLast())       {             ..............         }} 正確寫法:Cursor cursor = getContentResolver().query(

Android HorizontalScrollview Example

In android, we can scroll the elements in both horizontal and vertical format. To scroll in Vertical we can use Scrollview, to scroll in horizontal format we need to use HorizontalScrollview.Example for HorizontalScrollview :-01<?xml version="1.0"

Android遊戲開發之旅四 Canvas和Paint執行個體

昨天我們在Android遊戲開發之旅三 View詳解中提到了onDraw方法,有關詳細的實現我們今天主要說下Android的Canvas和Paint對象的使用執行個體。  Canvas類主要實現了螢幕的繪製過程,其中包含了很多實用的方法,比如繪製一條路徑、地區、貼圖、畫點、畫線、渲染文本,下面是Canvas類常用的方法,當然Android開發網提示大家很多方法有不同的重載版本,參數更靈活。  void drawRect(RectF rect, Paint paint)

Android Bitmap zoomIn/zoomOut/rotate ——圖片的縮小,放大 和旋轉

Java代碼 public void onCreate(Bundle icicle) {      super.onCreate(icicle);      LinearLayout linLayout = new LinearLayout(this);        // 載入需要操作的圖片,這裡是eoeAndroid的logo圖片      Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),             

Android 反編譯 .apk 檔案

dex2jar 和 JD-GUI 這2個工具是學習android的好幫手      dex2jar : http://laichao.googlecode.com/files/dex2jar-0.0.7-SNAPSHOT.zip      JD-GUI:     windows版JD-GUI: http://laichao.googlecode.com/files/jdgui.zip      linux版JD-GUI:

Android TabActivity——學習筆記

1、通過布局指定要顯示的內容:tabs.xml<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id=

android nine patch圖片

傳統UI開發中,如果背景的大小不一樣,一般需要為每種大小都製作一張圖片,這在button中尤為明顯。當然我們也可以一小塊一小塊水平重複的畫,也可以垂直的話。在android中專門有一種叫nine patch圖片(以 9.png結尾)來解決背景大小不一樣時,只用一張背景圖片。     用內建的tools/draw9patch.bat

android WebView 學習

在移動互連網的爭奪日趨白熱化,各個互連網巨頭紛紛推出自己的手機瀏覽器,瀏覽器市場的爭奪從案頭轉移到了手機。在Android手機中內建了一款高效能webkit核心瀏覽器,在SDK中封裝為一個叫做WebView組件。什麼是webkitWebKit是Mac OS X v10.3及以上版本所包含的軟體架構(對v10.2.7及以上版本也可通過軟體更新擷取)。同時,WebKit也是Mac OS

Android ViewFlipper 用例

[功能] 1. ViewFlipper 可以包含多個View 且View之間的切換有Animation  比如:漸層效果 [代碼] 1. 建立包含ViewFlipper 的main.xml 還包含2個Button 用於各個View切換Java代碼 <?xml version="1.0" encoding="utf-8"?>   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    

android Activity 中使用 ProgressDialog or Attempted to add window with non-application token WindowTok

線上程中通過Handler開啟 ProgressDialog的時候,出現如下的異常:W/WindowManager( 584): Attempted to add window with non-application token WindowToken{436ee690 token=null}. Aborting.D/AndroidRuntime(21543): Shutting down VMW/dalvikvm(21543): threadid=3: thread exiting

總頁數: 2771 1 .... 610 611 612 613 614 .... 2771 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.