首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏小工匠聊架构

    ContentProvider再探——Document Provider

    final MatrixCursor result = new MatrixCursor(resolveRootProjection(projection)); // final MatrixCursor.RowBuilder row = result.newRow(); row.add(Root.COLUMN_ROOT_ID, ROOT); row.add projection, String sortOrder) throws FileNotFoundException { final MatrixCursor result = new MatrixCursor(resolveDocumentProjection(projection)); final File parent final MatrixCursor result = new MatrixCursor(resolveDocumentProjection(projection));

    1.3K30发布于 2021-08-16
  • 来自专栏码客

    Android不同应用之间的数据传值

    ; import android.content.SharedPreferences; import android.database.Cursor; import android.database.MatrixCursor context, key, null); } private Cursor createSingleCursor(String key, String value) { MatrixCursor cursor = new MatrixCursor(new String[]{key}, 1); if (! return cursor; } private Cursor createCursor(String[] keys, String[] values) { MatrixCursor cursor = new MatrixCursor(keys, 1); cursor.addRow(values); return cursor; }

    1.8K10编辑于 2024-04-10
  • 来自专栏信数据得永生

    安卓应用安全指南 4.3.1 创建/使用内容供应器 示例代码

    private static MatrixCursor sAddressCursor = new MatrixCursor(new String[] { "_id", "city" }); static private static MatrixCursor sAddressCursor = new MatrixCursor(new String[] { "_id", "city" }); static private static MatrixCursor sAddressCursor = new MatrixCursor(new String[] { "_id", "city" }); static private static MatrixCursor sAddressCursor = new MatrixCursor(new String[] { "_id", "city" }); static private static MatrixCursor sAddressCursor = new MatrixCursor(new String[] { "_id", "city" }); static

    53910编辑于 2022-12-01
  • 来自专栏tea9的博客

    Android Intent漏洞

    query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { MatrixCursor matrixCursor = new MatrixCursor(new String[]{"_display_name"}); matrixCursor.addRow(new Object[] /lib-main/lib.so"}); return matrixCursor; } public ParcelFileDescriptor openFile(Uri uri, String

    1.8K30编辑于 2023-08-24
  • 来自专栏全栈程序员必看

    Android ListView几种Adapter用法简介「建议收藏」

    .准备数据 一般情况下Cursor都是通过查找数据获取到的,此处我们的重点是看如何用在SimpleCursorAdapter中来绑定到ListView中,因此我们使用可以直接示例化并可以直接插入数据的MatrixCursor 代码如下: String[] tableCursor = new String[] { "_id", "name", "phone" }; MatrixCursor cursor = new MatrixCursor

    2K20编辑于 2022-09-15
  • 来自专栏程序员修炼之路

    Android经典面试题之说说ContentProvider的生命周期及如何自定义?

    返回值是一个 Cursor,它必须指向目标数据集,即使没有结果,也应该返回不为 null 的 Cursor(如 MatrixCursor)。

    47410编辑于 2025-02-04
  • 来自专栏码上积木

    透过FileProvider再看ContentProvider

    } } cols = copyOf(cols, i); values = copyOf(values, i); final MatrixCursor cursor = new MatrixCursor(cols, 1); cursor.addRow(values); return cursor; }

    1.6K20发布于 2021-03-10
  • 来自专栏Android技术分享

    FileProvider你了解多少?透过FileProvider来看看四大组件之一ContentProvider!

    } } cols = copyOf(cols, i); values = copyOf(values, i); final MatrixCursor cursor = new MatrixCursor(cols, 1); cursor.addRow(values); return cursor; }

    1.3K01发布于 2021-03-01
  • 来自专栏program

    SettingsIntelligence

    SearchIndexablesProvider { @Override public Cursor queryXmlResources(String[] projection) { final MatrixCursor cursor = new MatrixCursor(INDEXABLES_XML_RES_COLUMNS); final List<SearchIndexableResource> resources

    1.2K40编辑于 2023-10-25
  • 来自专栏Android群英传

    Andromeda:适用于多进程架构的组件通信框架(上)

    public class DispatcherCursor extends MatrixCursor { public static final String KEY_BINDER_WRAPPER

    1.3K30发布于 2018-07-20
  • 来自专栏mukekeheart的iOS之旅

    Android基础总结(6)——内容提供器

    如,MatrixCursor类实现了每行是一个对象数组的游标,这个类用addRow()方法来添加新行。   记住,Android系统必须能够跨进程来传递异常。

    1.4K90发布于 2018-02-27
领券