开发者

TableLayout background from URI

开发者 https://www.devze.com 2023-01-21 07:01 出处:网络
How to use the setBackgroundDrawable method 开发者_如何学JAVAon tablelayout with an URI? public String getRealPathFromURI(Uri contentUri) {

How to use the setBackgroundDrawable method 开发者_如何学JAVAon tablelayout with an URI?


 public String getRealPathFromURI(Uri contentUri) {
        String[] proj = { MediaStore.Images.Media.DATA };
        Cursor cursor = managedQuery(contentUri, proj, null, null, null);
        int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
        cursor.moveToFirst();
        return cursor.getString(column_index);
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消