ITKeyword,专注技术干货聚合推荐

注册 | 登录

android - ActiveAndroid get data from two tables with CursorLoader (custom ContentProvider?)

itPublisher 分享于

2021腾讯云限时秒杀,爆款1核2G云服务器298元/3年!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1062

2021阿里云最低价产品入口+领取代金券(老用户3折起),
入口地址https://www.aliyun.com/minisite/goods

In active android there is option to get data from database using CursorLoader, but in example there is only option with 1 table:

MyActivity.this.getSupportLoaderManager().initLoader(0, null, new LoaderCallbacks<Cursor>() {
    @Override
    public Loader<Cursor> onCreateLoader(int id, Bundle cursor) {
        return new CursorLoader(MyActivity.this,
            ContentProvider.createUri(TodoItem.class, null),
            null, null, null, null
        );
    }
    // ...

});

I want to make join, in normal case i would make uri in content provider for joined tables, but ActiveAndroid delivers ContentProvider, and i dont know how should i do it. Is there option to use custom ContentProvider with ActiveAndroid? Or is there other option?

android android-contentprovider android-cursorloader android-loadermanager activeandroid
|
  this question
edited May 30 '15 at 12:18 jezrael 126k 16 51 93 asked May 30 '15 at 11:43 majere 26 6      Have you find it out yet? –  shmoula Jul 27 '15 at 13:42      ya if you have got the answers please help me out , i too want to do the same thing –  Aman Satija Aug 25 '15 at 14:05

 | 

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.


相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。