2014-11-22 42 views
0
public void onClick(View v) 

{ 

    try { 

     // Initiate ZipFile object with the path/name of the zip file. 

     ZipFile zipFile = new ZipFile("/sdcard/animation.zip"); 

     // Extracts all files to the path specified 
     zipFile.extractAll("/sdcard/"); 

    } catch (ZipException e) { 
     e.printStackTrace(); 
    } 

    Toast.makeText(getApplicationContext(), "button clicked", Toast.LENGTH_LONG).show(); 
} 

這就是我所做的。我想將我的animation.zip文件解壓縮到res/drawable-hdpi中

我可以在sdcard上解壓我的animation.zip文件,但我想將它解壓縮到res/drawable-hdpi文件夾中。

回答

0

你永遠不能解壓zip文件到res文件夾。在移動設備上,您可以將其解壓縮到SD卡或數據/數據文件夾。我認爲你想以這種方式更改應用的皮膚,但這是不可能的。如果你想改變皮膚,請按照下面的步驟操作:Android add extra skin as separate APK

+0

不,我想解壓那個dir和wnt以在幀動畫中使用。如果你可以幫助我的那個PLZ幫助我 – parth 2014-11-22 06:49:30