{"id":221851,"date":"2014-05-05T16:15:08","date_gmt":"2014-05-05T12:15:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=221851"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=221851","title":{"rendered":"<span class=\"post_title\">\u0421\u043f\u0438\u0441\u043a\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c ListView \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c API. \u041c\u043e\u043b, \u043f\u0443\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f \u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0443\u0432\u0438\u0434\u0438\u0442:  <\/p>\n<ul>\n<li>\u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0432\u0438\u0434\u0435\u043e, \u0441 \u0442\u0430\u043c\u043d\u0435\u0439\u043b\u0430\u043c\u0438 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438;<\/li>\n<li>\u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u0442\u0435\u0433\u043e\u0432, \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u00ab\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f\u00bb.<\/li>\n<\/ul>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 layout, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a \u2014 \u043f\u043b\u043e\u0445\u043e, \u0434\u0430 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c\u0441\u044f \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a \u0441\u0435\u0431\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c6e\/e4c\/fdc\/c6ee4cfdc3fa0ef1518d2d2972413506.png\"\/><br \/>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u043c API, \u043e\u0442\u0434\u0430\u044e\u0449\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/da7\/beb\/5df\/da7beb5df59ab747e4794a2ec1d04cbf.png\"\/><br \/>  \u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u0436\u0438\u0437\u043d\u044c \u043c\u0435\u0434\u043e\u043c \u043d\u0435 \u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c, \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 API \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041e\u0442 API \u043a ListView<\/h4>\n<p>  Virgil Dobjanschi \u043d\u0430 <a href=\"http:\/\/dl.google.com\/googleio\/2010\/android-developing-RESTful-android-apps.pdf\">Google I\/O 2010<\/a> \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u043b \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 REST API. \u0421\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0433\u043b\u0430\u0441\u0438\u0442:  <\/p>\n<ol>\n<li> Activity \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Service, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a REST API;<\/li>\n<li> Service \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414 \u0447\u0435\u0440\u0435\u0437 ContentProvider;<\/li>\n<li> Activity \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435.<\/li>\n<\/ol>\n<p>  \u0422\u0430\u043a \u0432 \u0438\u0442\u043e\u0433\u0435 \u0432\u0441\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0430\u0447\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a API, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ContentProvider \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438 REST-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e notifyChange \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043b\u0435\u043d\u0442\u0435. \u041d\u043e, \u043a\u0430\u043a \u0432\u043e\u0434\u0438\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:  <\/p>\n<ul>\n<li> \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a?<\/li>\n<li> \u041a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043b\u0435\u043d\u0442\u044b?<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a<\/h4>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0449\u0435. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u0443\u0433\u043b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0435\u0433\u043e \u043a\u0440\u0430\u0442\u043a\u043e.<br \/>  \u0412 <a href=\"http:\/\/developer.android.com\/reference\/android\/support\/v4\/widget\/CursorAdapter.html\">\u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0435<\/a> \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code class=\"java\">@Override int getViewTypeCount() { \t\/\/ \u0442\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \treturn VIEW_TYPE_COUNT; }  @Override int getItemViewType(int position) { \t\/\/ \u041f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u043e\u043c\u0443 \u043d\u043e\u043c\u0435\u0440\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0442\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \tCursor c = (Cursor)getItem(position); \tint columnIndex = c.getColumnIndex(VIEW_TYPE_COLUMN); \treturn c.getInt(columnIndex); }\t  @Override void bindView(View view, Context context, Cursor c) { \t\/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0432\u044c\u044e\u0445\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0438\u043f\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \tint columnIndex = c.getColumnIndex(VIEW_TYPE_COLUMN); \tint viewType = c.getInt(columnIndex); \tswitch(viewType) { \t\tcase VIEW_TYPE_VIDEO: \t\t\tbindVideoView(view); \t\t\tbreak; \t\tcase VIEW_TYPE_SUBSCRIPTION: \t\t\t\/\/ \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \t} }  @Override View newView(Context context, Cursor cursor, ViewGroup parent) { \t\/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u044c\u044e\u0445\u0443 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0438\u043f\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \tint columnIndex = c.getColumnIndex(VIEW_TYPE_COLUMN); \tint viewType = c.getInt(columnIndex); \tswitch(viewType) { \t\tcase VIEW_TYPE_VIDEO: \t\t\treturn newVideoView(cursor); \t\tcase VIEW_TYPE_SUBSCRIPTION: \t\t\t\/\/ \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \t} } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CursorAdapter<\/code> \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0430\u043c: \u0441\u0430\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u044d\u0448\u0438 \u0432\u044c\u044e\u0448\u0435\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439, \u0441\u0430\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0441 \u0442\u0435\u043c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u044c\u044e\u0448\u043a\u0438\u2026 \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0441\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u0432\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u043a\u0443\u0440\u0441\u043e\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 <code>VIEW_TYPE_COLUMN<\/code>.<\/p>\n<h4>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043b\u0435\u043d\u0442\u044b<\/h4>\n<p>  \u041f\u0443\u0441\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0411\u0414 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b:   <\/p>\n<ul>\n<li> <b>videos<\/b> \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u043b\u0435\u043d\u0442\u044b.<br \/>  \u041a\u043e\u043b\u043e\u043d\u043a\u0438 id, title, picture, updated. <\/li>\n<li> <b>authors, tags<\/b> \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043f\u0438\u0441\u043a\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f (\u043e\u0434\u0438\u043d \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 API \u0441\u0435\u0440\u0432\u0435\u0440\u0430). <br \/>  \u041a\u043e\u043b\u043e\u043d\u043a\u0438 id, name, picture, updated. <\/li>\n<\/ul>\n<p>  \u0418\u0442\u043e\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b:  <\/p>\n<table>\n<tr>\n<th>\u0441\u0442\u043e\u043b\u0431\u0435\u0446<\/th>\n<th>\u0432\u0438\u0434\u0435\u043e<\/th>\n<th>\u0430\u0432\u0442\u043e\u0440<\/th>\n<th>\u0442\u0435\u0433<\/th>\n<th>\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/th>\n<\/tr>\n<tr>\n<th>id<\/th>\n<td>video_id<\/td>\n<td>author_id<\/td>\n<td>tag_id<\/td>\n<td>\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435<\/td>\n<\/tr>\n<tr>\n<th>view_type<\/th>\n<td>VIDEO<\/td>\n<td>SUBSCRIPTION<\/td>\n<td>SUBSCRIPTION<\/td>\n<td>\u0442\u0438\u043f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<th>content_type<\/th>\n<td>videos<\/td>\n<td>authors<\/td>\n<td>tags<\/td>\n<td>\u0442\u0438\u043f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u2014 \u0438\u043b\u0438 \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435<\/td>\n<\/tr>\n<tr>\n<th>title<\/th>\n<td>video_title<\/td>\n<td>NULL<\/td>\n<td>NULL<\/td>\n<td>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e<\/td>\n<\/tr>\n<tr>\n<th>name<\/th>\n<td>NULL<\/td>\n<td>author_name<\/td>\n<td>tag_name<\/td>\n<td>\u0438\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0433\u0430<\/td>\n<\/tr>\n<tr>\n<th>picture<\/th>\n<td>link<\/td>\n<td>link<\/td>\n<td>link<\/td>\n<td>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/td>\n<\/tr>\n<tr>\n<th>updated<\/th>\n<td>timestamp<\/td>\n<td>timestamp<\/td>\n<td>timestamp<\/td>\n<td>\u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/td>\n<\/tr>\n<\/table>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.  <\/p>\n<ul>\n<li> <b>view_type<\/b> \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u0438\u043f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0442\u0435\u0433\u043e\u0432 \u0442\u0438\u043f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435.<\/li>\n<li> <b>content_type<\/b> \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u0442\u0435\u0433\u0430 \u043e\u043d \u0443\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\u043c\u0443 API \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/li>\n<li> <b>title, name \u0438 picture<\/b> \u2014 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0438\u043c\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0438\u043b\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/li>\n<li> <b>updated<\/b> \u2014 \u043f\u043e\u043b\u0435, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. <\/li>\n<\/ul>\n<p>  \u0412 sqlite \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439:  <\/p>\n<pre><code class=\"sql\">SELECT \t0 as view_type, \t'videos' as content_type, \ttitle, \tNULL as name, \tpicture, \tupdated FROM videos UNION ALL SELECT \t1 as view_type, \t'authors' as content_type, \tNULL as title, \tname, \tpicture, \tupdated FROM authors UNION ALL SELECT \t1 as view_type, \t'tags' as content_type, \tNULL as title, \tname, \tpicture, \tupdated FROM tags ORDER BY updated <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u00ab\u0440\u0443\u043a\u0430\u043c\u0438\u00bb, \u043d\u043e \u0432 <a href=\"http:\/\/developer.android.com\/reference\/android\/database\/sqlite\/SQLiteQueryBuilder.html\">SQLiteQueryBuilder<\/a> \u0435\u0441\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u0433\u043b\u044e\u0447\u043d\u044b\u0435, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u0418\u0442\u0430\u043a, Activity \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043d\u0430\u0448\u0435\u0433\u043e ContentProvider \u043b\u0435\u043d\u0442\u0443:<\/p>\n<pre><code class=\"java\">Cursor c = getContext().getContentResolver().query(Uri.parse(&quot;content:\/\/MyProvider\/feed\/&quot;)); <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>MyProvider.query<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u043c\u0435\u043d\u043d\u043e \u043a Uri \u043b\u0435\u043d\u0442\u044b, \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c \u00ab\u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.  <\/p>\n<pre><code class=\"java\">Cursor query(Uri contentUri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { \tif (isFeedUri(contentUri))  \t\treturn buildFeedUri(); \t\/\/ \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0440\u043e\u0438\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \t\/\/ ... }  Cursor buildFeedUri() { \t\/\/ \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 &quot;\u043d\u0435-\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0445&quot; \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \tHashSet&lt;String&gt; unionColumnsSet = new HashSet&lt;String&gt;();  \t\/\/ \u0441\u043f\u0438\u0441\u043e\u043a Uri \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 (videos, authors \u0438 tags) \tList&lt;Uri&gt;contentUriList = getSubqueryContentUriList();  \t\/\/ \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 viewType \tString[] viewTypeColumns = new String[contentUriList.size()];  \t\/\/ \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0435\u0435 contentType \tString[] contentTypeColumns = new String[contentUriList.size()];  \tfor (int i=0; i&lt;contentUriList.size(); i++) { \t\tUri contentUri = contentUriList.get(i); \t\t\/\/ \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0442\u0438\u043f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \t\tviewTypeColumns[i] = getViewTypeExpr(contentUri); \/\/ &quot;0 as view_type&quot; \t\t\/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 content_type \t\tcontentTypeColumns[i] = getContentTypeExpr(contentUri); \/\/ &quot;'videos' as content_type&quot; \t\t\/\/ \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \t\tList&lt;String&gt; projection = getProjection(contentUri); \t\t\/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446 \t\tunionColumnsSet.addAll(projection);  \t}  \t\/\/ \u0418\u0442\u043e\u0433\u043e, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043c\u044b \u0437\u043d\u0430\u0435\u043c: \u0442\u0438\u043f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438, \t\/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 content-type \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \tString[] subqueries = new String[contentUriList.size()]; \tfor (int i=0; i&lt;contentUriList.size(); i++) { \t\tUri contentUri = contentUriList.get(i); \t\tSQLiteQueryBuilder builder = new SQLiteQueryBuilder(); \t\tbuilder.setTables(getTable(contentUri));  \t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 &quot;1 as content_type&quot; \t\t\/\/ \u0434\u0430\u043d\u043d\u044b\u0439 \u0445\u0430\u043a \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b builder \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b  \t\t\/\/ \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f &quot;SELECT X as Y&quot; \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \t\tString[] unionColumns = prependContentTypeExpr(contentTypeColumns[i], unionColumnSet);  \t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a &quot;\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445&quot; \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &quot;0 as view_type&quot; \t\t\/\/ \u043e\u043f\u044f\u0442\u044c \u0445\u0430\u043a, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \t\tSet&lt;String&gt; projection = prependViewTypeExpr(viewTypeColumns[i], getProjection(contentUri));  \t\t\/\/ \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \t\tString selection = computeWhere(contentUri); \t\tsubqueries[i] = builder.buildUnionSubQuery( \t\t\t&quot;content_type&quot;, \/\/ typeDiscriminatorColumn - \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e,  \t\t\t\/\/ \u0438\u0437 \u043a\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u0437\u044f\u0442\u0430 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \t\t\tunionColumns, \t\t\tprojection, \t\t\t0, \t\t\tgetTable(contentUri), \/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438 content_type \t\t\t\/\/  (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b) \t\t\tselection, \t\t\tnull, \/\/  selectionArgs - \u0412\u041d\u0415\u0417\u0410\u041f\u041d\u041e \u043c\u0435\u0442\u043e\u0434\u043e\u043c buildUnionSubQuery \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f  \t\t\t\/\/ (\u0431\u0430\u0433\u0430 \u0442\u0430\u043a\u0430\u044f \u0441 API level 1, \u0432 API level 11 - \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0434\u0430\u043b\u0435\u043d) \t\t\tnull, \/\/ groupBy \t\t\tnull \/\/ having \t\t); \t} \t \t\/\/ \u0432\u0441\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \tSQLiteQueryBuilder builder = new SQLiteQueryBuilder() \tString orderBy = &quot;updated DESC&quot;; \tString query = builder.buildUnionQuery( \t\tsubqueries, \t\torderBy, \t\tnull \/\/ limit - \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a. \t);  \treturn getDBHelper().getReadableDatabase().rawQuery( \t\tquery, \t\tnull \/\/ selectionArgs - \u043d\u0430\u043c\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \t); } <\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a <code>content:\/\/MyProvider\/feed\/<\/code> \u043d\u0430\u0448 ContentProvider \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c UNION-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0434\u0430\u0441\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0443. <\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u041d\u043e \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435? \u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 API video, \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0443\u0434\u044f \u043f\u043e \u043b\u043e\u0433\u0430\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0411\u0414, \u043d\u043e ListView \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u2026<br \/>  \u0414\u0435\u043b\u043e \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/LoaderManager.LoaderCallbacks.html\">LoaderCallbacks<\/a>  <\/p>\n<pre><code class=\"java\">@Override public Loader&lt;Cursor&gt; onCreateLoader(int loaderId, Bundle params) { \treturn new CursorLoader( \t\tgetContext(), \t\tUri.parse(&quot;content:\/\/MyContentProvider\/feed\/&quot;), \t\t... \t); } <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 Activity \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 ContentProvider, CursorLoader \u0441\u043e\u0437\u0434\u0430\u0435\u0442 <a href=\"http:\/\/developer.android.com\/reference\/android\/database\/ContentObserver.html\">ContentObserver<\/a>, \u0441\u043b\u0435\u0434\u044f\u0449\u0438\u0439 \u0437\u0430 Uri <code>content:\/\/MyProvider\/feed\/<\/code>; \u043a\u043e\u0433\u0434\u0430 \u0436\u0435 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a API \u0441\u0435\u0440\u0432\u0435\u0440\u0430, ContentProvider \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 Uri, <code>content:\/\/MyProvider\/videos\/<\/code>.<br \/>  \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u044f \u043d\u0435 \u0437\u043d\u0430\u044e. \u0412 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u043a\u043e\u0434\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0411\u0414, \u044f\u0432\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0435\u043d\u0442\u044b (\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430):  <\/p>\n<pre><code class=\"java\">getContext.getContentResolver().notifyChange(Uri.parse(&quot;content:\/\/MyProvider\/feed\/&quot;, null)); <\/code><\/pre>\n<h4>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/developer.android.com\/reference\/android\/database\/MergeCursor.html\">MergeCursor<\/a> \u2014 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u043f\u0440\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u0437\u0430\u0442\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u0442.\u0434. <br \/>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435 \u0432\u0430\u0436\u0435\u043d \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434.<\/li>\n<li><a href=\"http:\/\/developer.android.com\/reference\/android\/database\/MatrixCursor.html\">MatrixCursor<\/a> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u0411\u0414 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0443. MergeCursor + \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 + MatrixCursor \u2014 \u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0440\u043e\u043a.  <\/li>\n<\/ul>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 CursorAdapter \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0430\u043c: \u0441\u0430\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u044d\u0448\u0438 \u0432\u044c\u044e\u0448\u0435\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439, \u0441\u0430\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0441 \u0442\u0435\u043c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u044c\u044e\u0448\u043a\u0438\u2026 \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0441\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u0432\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u043a\u0443\u0440\u0441\u043e\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 VIEW_TYPE_COLUMN.<\/p>\n<h4>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043b\u0435\u043d\u0442\u044b<\/h4>\n<p>  \u041f\u0443\u0441\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0411\u0414 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b:   <\/p>\n<ul>\n<li> <b>videos<\/b> \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u043b\u0435\u043d\u0442\u044b.<br \/>  \u041a\u043e\u043b\u043e\u043d\u043a\u0438 id, title, picture, updated. <\/li>\n<li> <b>authors, tags<\/b> \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043f\u0438\u0441\u043a\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f (\u043e\u0434\u0438\u043d \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 API \u0441\u0435\u0440\u0432\u0435\u0440\u0430). <br \/>  \u041a\u043e\u043b\u043e\u043d\u043a\u0438 id, name, picture, updated. <\/li>\n<\/ul>\n<p>  \u0418\u0442\u043e\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b:  <\/p>\n<table>\n<tr>\n<th>\u0441\u0442\u043e\u043b\u0431\u0435\u0446<\/th>\n<th>\u0432\u0438\u0434\u0435\u043e<\/th>\n<th>\u0430\u0432\u0442\u043e\u0440<\/th>\n<th>\u0442\u0435\u0433<\/th>\n<th>\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/th>\n<\/tr>\n<tr>\n<th>id<\/th>\n<td>video_id<\/td>\n<td>author_id<\/td>\n<td>tag_id<\/td>\n<td>\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435<\/td>\n<\/tr>\n<tr>\n<th>view_type<\/th>\n<td>VIDEO<\/td>\n<td>SUBSCRIPTION<\/td>\n<td>SUBSCRIPTION<\/td>\n<td>\u0442\u0438\u043f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<th>content_type<\/th>\n<td>videos<\/td>\n<td>authors<\/td>\n<td>tags<\/td>\n<td>\u0442\u0438\u043f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u2014 \u0438\u043b\u0438 \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435<\/td>\n<\/tr>\n<tr>\n<th>title<\/th>\n<td>video_title<\/td>\n<td>NULL<\/td>\n<td>NULL<\/td>\n<td>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e<\/td>\n<\/tr>\n<tr>\n<th>name<\/th>\n<td>NULL<\/td>\n<td>author_name<\/td>\n<td>tag_name<\/td>\n<td>\u0438\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0433\u0430<\/td>\n<\/tr>\n<tr>\n<th>picture<\/th>\n<td>link<\/td>\n<td>link<\/td>\n<td>link<\/td>\n<td>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/td>\n<\/tr>\n<tr>\n<th>updated<\/th>\n<td>timestamp<\/td>\n<td>timestamp<\/td>\n<td>timestamp<\/td>\n<td>\u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/td>\n<\/tr>\n<\/table>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.  <\/p>\n<ul>\n<li> <b>view_type<\/b> \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u0438\u043f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0442\u0435\u0433\u043e\u0432 \u0442\u0438\u043f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435.<\/li>\n<li> <b>content_type<\/b> \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u0442\u0435\u0433\u0430 \u043e\u043d \u0443\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\u043c\u0443 API \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/li>\n<li> <b>title, name \u0438 picture<\/b> \u2014 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0438\u043c\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0438\u043b\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/li>\n<li> <b>updated<\/b> \u2014 \u043f\u043e\u043b\u0435, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. <\/li>\n<\/ul>\n<p>  \u0412 sqlite \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439:  <\/p>\n<pre><code class=\"sql\">SELECT \t0 as view_type, \t'videos' as content_type, \ttitle, \tNULL as name, \tpicture, \tupdated FROM videos UNION ALL SELECT \t1 as view_type, \t'authors' as content_type, \tNULL as title, \tname, \tpicture, \tupdated FROM authors UNION ALL SELECT \t1 as view_type, \t'tags' as content_type, \tNULL as title, \tname, \tpicture, \tupdated FROM tags ORDER BY updated <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e StringBuilder, \u043d\u043e \u0432 <a href=\"http:\/\/developer.android.com\/reference\/android\/database\/sqlite\/SQLiteQueryBuilder.html\">SQLiteQueryBuilder<\/a> \u0435\u0441\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u0433\u043b\u044e\u0447\u043d\u044b\u0435, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u0418\u0442\u0430\u043a, Activity \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043d\u0430\u0448\u0435\u0433\u043e ContentProvider \u043b\u0435\u043d\u0442\u0443:  <\/p>\n<pre><code class=\"java\">getContext().getContentResolver().query(Uri.parse(&quot;content:\/\/MyProvider\/feed\/&quot;)) <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 MyProvider.query \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u043c\u0435\u043d\u043d\u043e \u043a Uri \u043b\u0435\u043d\u0442\u044b, \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c \u00ab\u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.  <\/p>\n<pre><code class=\"java\">Cursor query(Uri contentUri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { \tif (isFeedUri(contentUri))  \t\treturn buildFeedUri(...); \t\/\/ \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0440\u043e\u0438\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 }  Cursor buildFeedUri(...) { \t\/\/ \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 &quot;\u043d\u0435-\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0445&quot; \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \tHashSet&lt;String&gt; unionColumnsSet = new HashSet&lt;String&gt;();  \t\/\/ \u0441\u043f\u0438\u0441\u043e\u043a Uri \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 (videos, authors \u0438 tags) \tList&lt;Uri&gt;contentUriList = getSubqueryContentUriList();  \t\/\/ \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 viewType \tString[] viewTypeColumns = new String[contentUriList.size()];  \t\/\/ \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0435\u0435 contentType \tString[] contentTypeColumns = new String[contentUriList.size()];  \tfor (int i=0; i&lt;contentUriList.size(); i++) { \t\tUri contentUri = contentUriList.get(i); \t\t\/\/ \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0442\u0438\u043f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \t\tviewTypeColumns[i] = getViewTypeExpr(contentUri); \/\/ &quot;0 as view_type&quot; \t\t\/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 content_type \t\tcontentTypeColumns[i] = getContentTypeExpr(contentUri); \/\/ &quot;'videos' as content_type&quot; \t\t\/\/ \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \t\tList&lt;String&gt; projection = getProjection(contentUri); \t\t\/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446 \t\tunionColumnsSet.addAll(projection);  \t}  \t\/\/ \u0418\u0442\u043e\u0433\u043e, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043c\u044b \u0437\u043d\u0430\u0435\u043c: \u0442\u0438\u043f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438, \t\/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 content-type \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \tString[] subqueries = new String[contentUriList.size()]; \tfor (int i=0; i&lt;contentUriList.size(); i++) { \t\tUri contentUri = contentUriList.get(i); \t\tSQLiteQueryBuilder builder = new SQLiteQueryBuilder(); \t\tbuilder.setTables(getTable(contentUri));  \t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 &quot;1 as content_type&quot; \t\t\/\/ \u0434\u0430\u043d\u043d\u044b\u0439 \u0445\u0430\u043a \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b builder \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b  \t\t\/\/ \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f &quot;SELECT X as Y&quot; \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \t\tString[] unionColumns = prependContentTypeExpr(contentTypeColumns[i], unionColumnSet);  \t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a &quot;\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445&quot; \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &quot;0 as view_type&quot; \t\t\/\/ \u043e\u043f\u044f\u0442\u044c \u0445\u0430\u043a, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \t\tSet&lt;String&gt; projection = prependViewTypeExpr(viewTypeColumns[i], getProjection(contentUri));  \t\t\/\/ \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \t\tString selection = computeWhere(contentUri); \t\tsubqueries[i] = builder.buildUnionSubQuery( \t\t\t&quot;content_type&quot;, \/\/ typeDiscriminatorColumn - \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e,  \t\t\t\/\/ \u0438\u0437 \u043a\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u0437\u044f\u0442\u0430 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \t\t\tunionColumns, \t\t\tprojection, \t\t\t0, \t\t\tgetTable(contentUri), \/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438 content_type \t\t\t\/\/  (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b) \t\t\tselection, \t\t\tnull, \/\/  selectionArgs - \u0412\u041d\u0415\u0417\u0410\u041f\u041d\u041e \u043c\u0435\u0442\u043e\u0434\u043e\u043c buildUnionSubQuery \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f  \t\t\t\/\/ (\u0431\u0430\u0433\u0430 \u0442\u0430\u043a\u0430\u044f \u0441 API level 1, \u0432 API level 11 - \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0434\u0430\u043b\u0435\u043d) \t\t\tnull, \/\/ groupBy \t\t\tnull \/\/ having \t\t); \t} \t \t\/\/ \u0432\u0441\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \tSQLiteQueryBuilder builder = new SQLiteQueryBuilder() \tString orderBy = &quot;updated DESC&quot;; \tString query = builder.buildUnionQuery( \t\tsubqueries, \t\torderBy, \t\tnull \/\/ limit - \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a. \t);  \treturn getDBHelper().getReadableDatabase().rawQuery( \t\tquery, \t\tnull \/\/ selectionArgs - \u043d\u0430\u043c\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \t); } <\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a content:\/\/MyProvider\/feed\/ \u043d\u0430\u0448 ContentProvider \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c UNION-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0434\u0430\u0441\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0443. <\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u041d\u043e \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435? \u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 API video, \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0443\u0434\u044f \u043f\u043e \u043b\u043e\u0433\u0430\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0411\u0414, \u043d\u043e ListView \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u2026<br \/>  \u0414\u0435\u043b\u043e \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/LoaderManager.LoaderCallbacks.html\">LoaderCallbacks<\/a>  <\/p>\n<pre><code class=\"java\">@Override public Loader&lt;Cursor&gt; onCreateLoader(int loaderId, Bundle params) { \treturn new CursorLoader( \t\tgetContext(), \t\tUri.parse(&quot;content:\/\/MyContentProvider\/feed\/&quot;), \t\t... \t); } <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 Activity \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 ContentProvider, CursorLoader \u0441\u043e\u0437\u0434\u0430\u0435\u0442 <a href=\"http:\/\/developer.android.com\/reference\/android\/database\/ContentObserver.html\">ContentObserver<\/a>, \u0441\u043b\u0435\u0434\u044f\u0449\u0438\u0439 \u0437\u0430 Uri <code>content:\/\/MyProvider\/feed\/<\/code>; \u043a\u043e\u0433\u0434\u0430 \u0436\u0435 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a API \u0441\u0435\u0440\u0432\u0435\u0440\u0430, ContentProvider \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 Uri, <code>content:\/\/MyProvider\/videos\/<\/code>.<br \/>  \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u044f \u043d\u0435 \u0437\u043d\u0430\u044e. \u0412 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u043a\u043e\u0434\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0411\u0414, \u044f\u0432\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0435\u043d\u0442\u044b (\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430):  <\/p>\n<pre><code class=\"java\">getContext.getContentResolver().notifyChange(Uri.parse(&quot;content:\/\/MyProvider\/feed\/&quot;, null)); <\/code><\/pre>\n<h4>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/developer.android.com\/reference\/android\/database\/MergeCursor.html\">MergeCursor<\/a> \u2014 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u043f\u0440\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u0437\u0430\u0442\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u0442.\u0434. <br \/>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435 \u0432\u0430\u0436\u0435\u043d \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434.<\/li>\n<li><a href=\"http:\/\/developer.android.com\/reference\/android\/database\/MatrixCursor.html\">MatrixCursor<\/a> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u0411\u0414 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0443. MergeCursor + \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 + MatrixCursor \u2014 \u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0440\u043e\u043a.  <\/li>\n<p>  \u0412\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u044f \u043d\u0435 java-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0436\u0443\u0442\u043a\u0438\u043c \u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434\u043e\u043c. \u0415\u0441\u043b\u0438 \u043a\u043e\u0434 \u0433\u043b\u0430\u0437\u0430 \u0440\u0435\u0436\u0435\u0442, \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443. \u041d\u0430\u0434\u043e \u0436\u0435 \u0440\u0430\u0441\u0442\u0438 \u043d\u0430\u0434 \u0441\u043e\u0431\u043e\u0439. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/ul>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/221851\/\"> http:\/\/habrahabr.ru\/post\/221851\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c ListView \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c API. \u041c\u043e\u043b, \u043f\u0443\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f \u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0443\u0432\u0438\u0434\u0438\u0442:  <\/p>\n<ul>\n<li>\u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0432\u0438\u0434\u0435\u043e, \u0441 \u0442\u0430\u043c\u043d\u0435\u0439\u043b\u0430\u043c\u0438 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438;<\/li>\n<li>\u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u0442\u0435\u0433\u043e\u0432, \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u00ab\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f\u00bb.<\/li>\n<\/ul>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 layout, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a \u2014 \u043f\u043b\u043e\u0445\u043e, \u0434\u0430 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c\u0441\u044f \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a \u0441\u0435\u0431\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c6e\/e4c\/fdc\/c6ee4cfdc3fa0ef1518d2d2972413506.png\"\/><br \/>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u043c API, \u043e\u0442\u0434\u0430\u044e\u0449\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/da7\/beb\/5df\/da7beb5df59ab747e4794a2ec1d04cbf.png\"\/><br \/>  \u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u0436\u0438\u0437\u043d\u044c \u043c\u0435\u0434\u043e\u043c \u043d\u0435 \u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c, \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 API \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-221851","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/221851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221851"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/221851\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}