forked from Blankj/AndroidUtilCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSDCardActivity.java
More file actions
33 lines (28 loc) · 1014 Bytes
/
SDCardActivity.java
File metadata and controls
33 lines (28 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.blankj.androidutilcode.activity;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.blankj.androidutilcode.R;
import com.blankj.utilcode.util.SDCardUtils;
/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/27
* desc : SDCard工具类Demo
* </pre>
*/
public class SDCardActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sdcard);
TextView tvAboutSdcard = (TextView) findViewById(R.id.tv_about_sdcard);
tvAboutSdcard.setText("isSDCardEnable: " + SDCardUtils.isSDCardEnable()
+ "\ngetDataPath: " + SDCardUtils.getDataPath()
+ "\ngetSDCardPath: " + SDCardUtils.getSDCardPath()
+ "\ngetFreeSpace: " + SDCardUtils.getFreeSpace()
+ "\ngetSDCardInfo: " + SDCardUtils.getSDCardInfo()
);
}
}