资源简介

保存图片到本地相册,可以在相册查看,Android 6.0以上也可以实现

资源截图

代码片段和文件信息

package com.zx.saveimgtogallery;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
 * Instrumentation test which will execute on an Android device.
 *
 * @see Testing documentation
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals(“com.zx.saveimgtogallery“ appContext.getPackageName());
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\
     文件         118  2017-04-10 02:53  SaveImgToGallery-master\.gitignore
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\.idea\
     文件         709  2017-04-10 02:53  SaveImgToGallery-master\.idea\compiler.xml
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\.idea\copyright\
     文件          74  2017-04-10 02:53  SaveImgToGallery-master\.idea\copyright\profiles_settings.xml
     文件         159  2017-04-10 02:53  SaveImgToGallery-master\.idea\encodings.xml
     文件         626  2017-04-10 02:53  SaveImgToGallery-master\.idea\gradle.xml
     文件         232  2017-04-10 02:53  SaveImgToGallery-master\.idea\kotlinc.xml
     文件        2629  2017-04-10 02:53  SaveImgToGallery-master\.idea\misc.xml
     文件         369  2017-04-10 02:53  SaveImgToGallery-master\.idea\modules.xml
     文件         564  2017-04-10 02:53  SaveImgToGallery-master\.idea\runConfigurations.xml
     文件          59  2017-04-10 02:53  SaveImgToGallery-master\README.md
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\
     文件           7  2017-04-10 02:53  SaveImgToGallery-master\app\.gitignore
     文件         918  2017-04-10 02:53  SaveImgToGallery-master\app\build.gradle
     文件         641  2017-04-10 02:53  SaveImgToGallery-master\app\proguard-rules.pro
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\androidTest\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\androidTest\java\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\androidTest\java\com\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\androidTest\java\com\zx\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\androidTest\java\com\zx\saveimgtogallery\
     文件         750  2017-04-10 02:53  SaveImgToGallery-master\app\src\androidTest\java\com\zx\saveimgtogallery\ExampleInstrumentedTest.java
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\
     文件         825  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\AndroidManifest.xml
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\java\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\java\com\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\java\com\zx\
     目录           0  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\java\com\zx\saveimgtogallery\
     文件        1675  2017-04-10 02:53  SaveImgToGallery-master\app\src\main\java\com\zx\saveimgtogallery\ImgUtils.java
............此处省略38个文件信息

评论

共有 条评论