{"id":269049,"date":"2015-11-26T11:43:02","date_gmt":"2015-11-26T08:43:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269049"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269049","title":{"rendered":"Floating toolbar for text selection \u0432 Android Marshmallow: \u0440\u0430\u0437\u0431\u043e\u0440 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/hsto.org\/files\/bf6\/fcb\/9b3\/bf6fcb9b3830482981c710658371e364.gif\" align=\"right\"\/>\u0412 Android Marshmallow (SDK 23) \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430\u0434 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438\u00bb, \u00ab\u041f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb, \u00ab\u041f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb.<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043a \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044e \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/google\/blog\/270287\/\">GDG \u0432 \u041d\u0438\u0436\u043d\u0435\u043c \u041d\u043e\u0432\u0433\u043e\u0440\u043e\u0434\u0435<\/a> \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u044d\u0442\u0430 \u043d\u043e\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u0432 \u0441\u0435\u0442\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0449\u0435 \u043c\u0430\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u043c\u0443. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u043d\u044e \u0432 Android \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u043e, \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043d\u0430\u0447\u0430\u0442\u044c \u00ab\u043e\u0442 \u043f\u0435\u0447\u043a\u0438\u00bb. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441 \u043e\u043f\u044b\u0442\u043e\u043c \u043c\u043e\u0433\u0443\u0442 \u0441\u043c\u0435\u043b\u043e \u043b\u0438\u0441\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <a href=\"#new\">\u00ab\u041d\u043e\u0432\u043e\u0435\u00bb<\/a> \u0431\u0435\u0437 \u0440\u0438\u0441\u043a\u0430 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e \u2013 \u043f\u043e\u0442\u043e\u043c \u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u043c\u043e\u043b\u043e\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430\u043c\u0438 \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<h1>\u0421\u0442\u0430\u0440\u043e\u0435<\/h1>\n<p>  <\/p>\n<h2>\u041f\u0435\u0440\u0432\u043e\u0435. \u041c\u0435\u043d\u044e \u0432\u0443\u043b\u044c\u0433\u0430\u0440\u0438\u0441<\/h2>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0441\u043a\u0430\u0437 \u043f\u0440\u043e \u0441\u0430\u043c\u043e\u0435 \u0441\u0442\u0430\u0440\u043e\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043c\u0435\u043d\u044e. \u0421 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\u041c\u0435\u043d\u044e \u0432 Android \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e: \u043e\u043d\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/developer.android.com\/guide\/topics\/resources\/menu-resource.html\">XML<\/a>, \u0437\u0430\u0442\u0435\u043c \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044d\u0442\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/MenuInflater.html\">MenuInflater<\/a> \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u044d\u0442\u043e \u043c\u0435\u043d\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f, \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043b\u0431\u044d\u043a.<\/p>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e\u0435 \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u00abMenu\u00bb, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 XML-\u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"xml\">&lt;menu xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;     &lt;item         android:id=&quot;@+id\/action_foo&quot;         android:orderInCategory=&quot;100&quot;         android:title=&quot;@string\/word_foo&quot;\/&gt;     &lt;item         android:id=&quot;@+id\/action_foobar&quot;         android:orderInCategory=&quot;101&quot;         android:title=&quot;@string\/word_bar&quot;\/&gt;     &lt;item         android:id=&quot;@+id\/action_baz&quot;         android:orderInCategory=&quot;102&quot;         android:title=&quot;@string\/word_baz&quot;\/&gt; &lt;\/menu&gt; <\/code><\/pre>\n<p>  \u041f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u043f\u043e\u043b\u044e android:orderInCategory.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044e \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0438\u043d\u0444\u043b\u0435\u0439\u0442\u0435\u0440\u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onCreateOptionsMenu(android.view.Menu)\">onCreateOptionsMenu()<\/a>.<\/p>\n<pre><code class=\"java\">@Override public boolean onCreateOptionsMenu(Menu menu) {     MenuInflater inflater = getMenuInflater();     inflater.inflate(R.menu.my_menu, menu);     return true; } <\/code><\/pre>\n<p>  \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u044b\u0431\u043e\u0440\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onOptionsItemSelected(android.view.MenuItem)\">onOptionsItemSelected()<\/a>.<\/p>\n<pre><code class=\"java\">@Override public boolean onOptionsItemSelected(MenuItem item) {     \/\/ Handle item selection     switch (item.getItemId()) {         case R.id.action_foo:             toast(&quot;foo&quot;);             return true;         case R.id.action_foobar:             toast(&quot;bar&quot;);             return true;         case R.id.action_baz:             toast(&quot;baz&quot;);             return true;         default:             return super.onOptionsItemSelected(item);     } } <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u043d\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/655\/1e8\/452\/6551e84522c144349b10f9787aa5e35b.png\"\/><\/p>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e.   <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0412\u0442\u043e\u0440\u043e\u0435. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e<\/h2>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0441\u043a\u0430\u0437 \u043f\u0440\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e. \u0421 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u2013 \u044d\u0442\u043e \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u042d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u044e. <\/p>\n<p>  \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u043c\u0435\u043d\u044e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438. \u041d\u043e \u044d\u0442\u043e\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u0431\u044b\u043b \u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e \u0441\u043f\u0438\u0441\u043a\u0438, \u0447\u0435\u043c \u043f\u0440\u043e \u043c\u0435\u043d\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0431\u0435\u0437 \u043d\u0438\u0445. <\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. <\/p>\n<p>  \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onCreate(android.os.Bundle)\">onCreate()<\/a>: <\/p>\n<pre><code class=\"java\">@Override protected void onCreate(Bundle savedInstanceState) {     ...     registerForContextMenu(findViewById(R.id.text_view_one)); } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u0441\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u0443\u043d\u043a\u0442\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (<a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo)\">onCreateContextMenu()<\/a> \u0438 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onContextItemSelected(android.view.MenuItem)\">onContextItemSelected()<\/a>):<\/p>\n<pre><code class=\"java\">@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {     super.onCreateContextMenu(menu, v, menuInfo);     MenuInflater inflater = getMenuInflater();     inflater.inflate(R.menu.my_menu, menu); } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">@Override public boolean onContextItemSelected(MenuItem item) {     switch (item.getItemId()) {         case R.id.action_foo:             toast(&quot;foo&quot;);             return true;         case R.id.action_foobar:             toast(&quot;bar&quot;);             return true;         case R.id.action_baz:             toast(&quot;baz&quot;);             return true;         default:             return super.onContextItemSelected(item);     } } <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0434\u043e\u043b\u0433\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/173\/ee9\/001\/173ee9001be24a08ae91f7aad0f5431b.png\"\/>  <\/div>\n<\/div>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0422\u0440\u0435\u0442\u044c\u0435. \u041c\u0435\u043d\u044e \u0432 AppBar \u0438 Toolbar<\/h2>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0441\u043a\u0430\u0437 \u043f\u0440\u043e \u043c\u0435\u043d\u044e \u0441 Toolbar. \u0421 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android Honeycomb (\u043e\u043d \u0436\u0435 3.0, \u043e\u043d \u0436\u0435 SDK 11, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u043e\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e) \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 Menu \u0431\u044b\u043b\u0430 \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0435\u043d\u0430, \u0430 \u043c\u0435\u043d\u044e \u0441\u0442\u0430\u043b\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u00ab\u0441\u0442\u0440\u043e\u043a\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439\u00bb, \u043e\u043d\u0430 \u0436\u0435 \u00abapplication bar\u00bb. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043c\u0435\u043d\u044e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0438\u043a\u043e\u043d\u043e\u043a, \u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u0434\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u0430 \u0437\u043d\u0430\u0447\u043e\u043a \u043c\u0435\u043d\u044e. <\/p>\n<p>  \u041f\u043e\u043b\u044f \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u043a\u043e\u043d\u043e\u043a \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438 XML \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u043d\u044e. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0442\u043e \u0436\u0435 \u043c\u0435\u043d\u044e \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u043d\u0430\u043c <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onCreateOptionsMenu(android.view.Menu)\">onCreateOptionsMenu()<\/a> \u0438 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onOptionsItemSelected(android.view.MenuItem)\">onOptionsItemSelected()<\/a>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u0435\u043d\u044e \u0441 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438 \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c android:icon \u0438 android:orderInCategory<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;menu xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;       xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;&gt;     &lt;item         android:id=&quot;@+id\/action_foo&quot;         android:icon=&quot;@android:drawable\/ic_media_previous&quot;         android:orderInCategory=&quot;100&quot;         android:title=&quot;@string\/word_foo&quot;         app:showAsAction=&quot;ifRoom&quot;         \/&gt;     &lt;item         android:id=&quot;@+id\/action_foobar&quot;         android:icon=&quot;@android:drawable\/ic_media_next&quot;         android:orderInCategory=&quot;101&quot;         android:title=&quot;@string\/word_bar&quot;         app:showAsAction=&quot;ifRoom&quot;         \/&gt;     &lt;item         android:id=&quot;@+id\/action_baz&quot;         android:icon=&quot;@android:drawable\/ic_media_pause&quot;         android:orderInCategory=&quot;102&quot;         android:title=&quot;@string\/word_baz&quot;         app:showAsAction=&quot;never&quot;\/&gt; &lt;\/menu&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7b2\/51a\/57e\/7b251a57ea4c4cc0a9470149bc3f3fa1.png\"\/><br \/>  \u0412\u0438\u0434\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u043d\u044e  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fa2\/756\/066\/fa2756066e284dd99dd1760099d5ff0c.png\"\/><br \/>  \u0421\u043a\u0440\u044b\u0442\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u043d\u044e, <br \/>  \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u00ab\u0442\u0440\u0438 \u0442\u043e\u0447\u043a\u0438\u00bb  <\/td>\n<\/tr>\n<\/table>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e \u043c\u0435\u043d\u044e \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u043d\u0430\u044e\u0442 \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0436\u0435 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432\u043e\u0439 \u043a\u043d\u0438\u0436\u043a\u0438. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u044f \u0434\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u0441\u044e\u0434\u0430, \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439.   <\/div>\n<\/div>\n<p>  <a name=\"contextaction\"><\/a>  <\/p>\n<h2>\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0435. \u0420\u0435\u0436\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (Contextual action mode)<\/h2>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0441\u043a\u0430\u0437 \u043f\u0440\u043e contextual action mode. \u0421 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\u0420\u0435\u0436\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043e\u043d \u0436\u0435 \u00abContextual action mode\u00bb \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0431\u043e\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c. \u041a\u0430\u043a \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e, \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u0434\u043e\u0431\u0435\u043d \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438, \u043d\u043e \u0441\u043f\u0438\u0441\u043a\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c. <\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u00ab\u0432\u044b\u0431\u0440\u0430\u0442\u044c\u00bb. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/ToggleButton.html\">ToggleButton<\/a>. \u0414\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0441\u0430\u043c\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 ToggleButton:<\/p>\n<pre><code class=\"java\">checkedListener =         new CompoundButton.OnCheckedChangeListener() {             @Override             public void onCheckedChanged(CompoundButton buttonView,                                          boolean isChecked)             {                 if (isChecked) {                     actionMode = startActionMode(actionModeCallback);                     actionMode.setTitle(&quot;Action Mode&quot;);                 } else {                     if (actionMode != null) {                         actionMode.finish();                     }                 }             }         }; toggleButton.setOnCheckedChangeListener(checkedListener); <\/code><\/pre>\n<p>  actionModeCallback \u2013 \u044d\u0442\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback.html\">ActionMode.Callback<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0435\u043d\u044e. \u041c\u0435\u043d\u044e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0442\u0435\u043c \u0436\u0435, \u0432\u0441\u0435 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0430\u0440\u043e\u0439 \u0434\u043e\u0431\u0440\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u043e\u0439:<\/p>\n<pre><code class=\"java\">actionModeCallback = new ActionMode.Callback() {     @Override     public boolean onCreateActionMode(ActionMode mode, Menu menu) {         MenuInflater inflater = mode.getMenuInflater();         inflater.inflate(R.menu.my_menu_two, menu);         return true;     }     ...      @Override     public void onDestroyActionMode(ActionMode mode) {         actionMode = null;         toggleButton.setChecked(false);     } }; <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 actionMode. \u042d\u0442\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.html\">ActionMode<\/a>, \u043d\u0430\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a (<a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.html#setTitle(int)\">actionMode.setTitle()<\/a>), \u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a (<a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.html#setSubtitle(int)\">actionMode.setSubtitle()<\/a>), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0435\u0436\u0438\u043c (<a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.html#finish()\">actionMode.finish()<\/a>). \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0440\u0435\u0436\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f, \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0442\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0430\u043c\u0438. <\/p>\n<p>  \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0442\u043e\u0436\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"java\">actionModeCallback = new ActionMode.Callback() {     ...       @Override     public boolean onActionItemClicked(ActionMode mode, MenuItem item) {         switch (item.getItemId()) {             case R.id.action_compass:                 toast(&quot;compass&quot;);                 return true;             case R.id.action_camera:                 toast(&quot;camera&quot;);                 return true;             default:                 return false;         }     } }; <\/code><\/pre>\n<p>  \u041c\u0435\u043d\u044e \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d XML c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">XML \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u043d\u044e. \u0422\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;menu xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;       xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;&gt;     &lt;item         android:id=&quot;@+id\/action_camera&quot;         android:icon=&quot;@android:drawable\/ic_menu_camera&quot;         android:orderInCategory=&quot;100&quot;         android:title=&quot;@string\/word_camera&quot;         app:showAsAction=&quot;ifRoom&quot;         \/&gt;     &lt;item         android:id=&quot;@+id\/action_compass&quot;         android:icon=&quot;@android:drawable\/ic_menu_compass&quot;         android:orderInCategory=&quot;101&quot;         android:title=&quot;@string\/word_compass&quot;         app:showAsAction=&quot;ifRoom&quot;         \/&gt; &lt;\/menu&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435:  <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1ae\/a4f\/5d7\/1aea4f5d7c53497793e268156c26a13e.png\"\/>  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/152\/e34\/521\/152e3452195c4cf8baccc662ecfb71e0.png\"\/>  <\/td>\n<\/tr>\n<\/table>\n<p>  \u0412\u0441\u0435 \u0441\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u043e\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0441 SDK 11 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c, \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435.   <\/div>\n<\/div>\n<p>  <a name=\"new\"><\/a>  <\/p>\n<h1>\u041d\u043e\u0432\u043e\u0435<\/h1>\n<p>  \u0412 Android Marshmallow (\u043e\u043d \u0436\u0435 6.0, \u043e\u043d \u0436\u0435 SDK 23) \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u0435\u043d\u044e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432\u0430. \u041e\u0431\u0430 \u044d\u0442\u0438 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432\u0430 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f Support Library \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0441 SDK 23. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u043e\u043c\u0435\u0440 SDK \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. <\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430 \u043c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f \u043e\u0442 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u0443\u043a\u0430\u0437\u0430\u0432 minSdkVersion 23.<\/p>\n<h2>\u041f\u044f\u0442\u043e\u0435. \u0415\u0449\u0435 \u043e\u0434\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e<\/h2>\n<p>  \u041c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <a href=\"#contextaction\">\u00ab\u0420\u0435\u0436\u0438\u043c\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439\u00bb<\/a> (\u043e\u043f\u0438\u0441\u0430\u043d \u0432\u044b\u0448\u0435) \u0431\u044b\u043b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d. \u0412\u0442\u043e\u0440\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#startActionMode(android.view.ActionMode.Callback, int)\">startActionMode()<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0434\u0430\u0435\u0442 \u0442\u0438\u043f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.html#TYPE_PRIMARY\">ActionMode.TYPE_PRIMARY<\/a> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0442\u0430\u0440\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u0422\u043e \u0435\u0441\u0442\u044c <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#startActionMode(android.view.ActionMode.Callback)\">startActionMode(actionModeCallback)<\/a> \u0438 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#startActionMode(android.view.ActionMode.Callback, int)\">startActionMode(actionModeCallback, ActionMode.TYPE_PRIMARY)<\/a> \u2013 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0438\u043f <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.html#TYPE_FLOATING\">ActionMode.TYPE_FLOATING<\/a>, \u0442\u043e \u043c\u0435\u043d\u044e \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3df\/573\/0d0\/3df5730d0aac4d1384aeff3e96de1e82.png\"\/><\/p>\n<p>  \u0418\u043a\u043e\u043d\u043e\u043a \u043d\u0435\u0442. \u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2013 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u0430\u044e\u0442 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435, \u0442\u043e \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u00ab\u0442\u0440\u0438 \u0442\u043e\u0447\u043a\u0438\u00bb:  <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/279\/48b\/4ee\/27948b4eefc84563adcf0a7181ea336d.png\"\/>  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a99\/53b\/fd8\/a9953bfd84384747864b39930989b873.png\"\/>  <\/td>\n<\/tr>\n<\/table>\n<p>  \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u2013 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0432 <a href=\"#contextaction\">\u00abContextual action mode\u00bb<\/a> (\u0441\u043c. \u0432\u044b\u0448\u0435).<\/p>\n<h2>\u0428\u0435\u0441\u0442\u043e\u0435. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044e \u043f\u0440\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430<\/h2>\n<p>  \u041d\u0443 \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0442\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0449\u0430\u043d\u043e \u0432 <a href=\"http:\/\/developer.android.com\/intl\/ru\/about\/versions\/marshmallow\/android-6.0-changes.html#behavior-text-selection\">\u0441\u0442\u0430\u0442\u044c\u0435 \u043e \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u0445 \u0432 Android Marshmallow<\/a>. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044e, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0435\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430, \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438. \u0410\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0447\u0443\u0434\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043e\u043d\u0430 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0410\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0441 \u043c\u0435\u043d\u044e<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cae\/2cd\/fcf\/cae2cdfcf86141b5aadd709d13a38a33.gif\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback.html\">ActionMode.Callback<\/a> \u043a\u043e\u043b\u0431\u044d\u043a. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u043c\u0438 \u0432\u044b\u0448\u0435 \u0434\u043b\u044f <a href=\"#contextaction\">\u00abContextual action mode\u00bb<\/a>. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043c\u0435\u043d\u044e \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043b\u0431\u044d\u043a:<\/p>\n<pre><code class=\"java\">textView.setTextIsSelectable(true); textView.setCustomSelectionActionModeCallback(actionModeCallback);  editText.setCustomSelectionActionModeCallback(actionModeCallback); editText.setCustomInsertionActionModeCallback(actionModeCallback); <\/code><\/pre>\n<p>  \u041a\u043e\u043b\u0431\u044d\u043a, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/TextView.html#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback)\">setCustomSelectionActionModeCallback()<\/a>, \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442. \u0423\u043a\u0430\u0437\u0430\u043d\u044b\u0439 \u0432 <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/TextView.html#setCustomInsertionActionModeCallback(android.view.ActionMode.Callback)\">setCustomInsertionActionModeCallback()<\/a> \u2013 \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435\u0442. \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u0438\u0445 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0441\u043c\u044b\u0441\u043b, \u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e, \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043c\u0435\u043d\u044e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c.   <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4e6\/16c\/36b\/4e616c36b1954b09bf89d5f05e804943.png\"\/>  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/30e\/ed7\/51b\/30eed751b8ba41df99affdc52ab45291.png\"\/>  <\/td>\n<\/tr>\n<\/table>\n<p>  \u041d\u0430 \u043f\u0443\u0441\u0442\u043e\u043c EditText \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/57d\/236\/751\/57d2367516824e2b8af5d3bb01a29f10.png\"\/>  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/419\/227\/8b4\/4192278b4f7f4298b391a210ca0d055c.png\"\/>  <\/td>\n<\/tr>\n<\/table>\n<h3>\u041e\u0439. \u041a\u0443\u0434\u0430 \u0434\u0435\u043b\u043e\u0441\u044c \u043c\u043e\u0435 \u043c\u0435\u043d\u044e?<\/h3>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u043d\u0438\u0436\u0435. \u0415\u0441\u0442\u044c \u0438\u0434\u0435\u044f, \u043a\u0443\u0434\u0430 \u0434\u0435\u043b\u0438\u0441\u044c \u0432\u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e?   <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/44d\/5b8\/589\/44d5b8589ac549b2b41e2211d1797552.png\"\/>  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c6f\/d69\/c99\/c6fd69c996374252be53855f7026037b.png\"\/>  <\/td>\n<\/tr>\n<\/table>\n<p>  \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/aa7\/268\/934\/aa72689341c0488fb39141330f9f7ef5.png\"\/><\/p>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e, \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u043d\u044e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u044b \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u044f\u0442\u0441\u044f. \u0418 \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043a\u0440\u043e\u043b\u043b. \u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u0445 \u0432\u0432\u0435\u0440\u0445\u0443 \u0442\u0430\u043a \u0438 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u043d\u0438\u043a\u0430\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043a\u0440\u043e\u043b\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u0432\u0438\u0434\u043d\u043e: \u0437\u043d\u0430\u0447\u043e\u043a \u0441\u043a\u0440\u043e\u043b\u043b\u0430 \u043f\u043e\u0447\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442, \u0430 \u043a\u0440\u0430\u0439 \u043d\u0435\u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0435\u0442. \u0417\u0430\u0432\u0435\u043b \u0431\u0430\u0433\u0443, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u044d\u0442\u043e\u0439 \u0444\u0438\u0447\u0438 \u0441\u043a\u0430\u0436\u0443\u0442. <a href=\"https:\/\/code.google.com\/p\/android\/issues\/detail?id=195043\">code.google.com\/p\/android\/issues\/detail?id=195043<\/a><\/p>\n<h3>\u041a\u0443\u0434\u0430 \u043e\u043f\u044f\u0442\u044c \u0434\u0435\u043b\u043e\u0441\u044c \u043c\u043e\u0435 \u043c\u0435\u043d\u044e?<\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/0d2\/e0e\/5ad\/0d2e0e5adeee4be597c07900bb7838be.png\"\/><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043c\u0435\u043d\u044e \u043f\u0440\u0438 fullscreen input mode \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442\u0441\u044f. \u0412\u043e\u0440\u043a\u044d\u0440\u0430\u0443\u043d\u0434 \u044f \u043d\u0430\u0448\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d: \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c fullscreen \u0440\u0435\u0436\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e android:imeOptions=\u00abflagNoExtractUi\u00bb.<\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0443\u043d\u043a\u0442 \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438?<\/h3>\n<p>  \u0420\u043e\u0434\u043d\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e \u0438\u043c\u0435\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b order \u043e\u0442 1 \u0434\u043e 5. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e android:orderInCategory \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u0435\u043d\u044e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u0440\u043e\u0434\u043d\u044b\u043c\u0438 \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438 \u043d\u0435\u043b\u044c\u0437\u044f. \u041d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0432 \u0443\u0436\u0435 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0435\u043d\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"java\">@Override public boolean onPrepareActionMode(ActionMode mode, Menu menu) {     \/\/ \u0440\u043e\u0434\u043d\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e &quot;\u043d\u0443\u043c\u0435\u0440\u0443\u044e\u0442\u0441\u044f&quot; \u0441 1,      \/\/ \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044f &quot;\u043f\u0440\u043e\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043b&quot; \u0441\u043e 100     while (menu.getItem(0).getOrder() &lt; 100) {         MenuItem item = menu.getItem(0);         menu.removeItem(item.getItemId());         \/\/ \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u043e\u0434\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 &quot;\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f&quot; \u0441 200, \u0442\u043e \u0435\u0441\u0442\u044c         \/\/ \u0441\u0442\u0430\u043d\u0443\u0442 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445         menu.add(item.getGroupId(), item.getItemId(),                 item.getOrder() + 200, item.getTitle());     }     return true; } <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:  <\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c77\/54b\/352\/c7754b35275c4192a0e5f7de2a204dc0.png\"\/>  <\/td>\n<td><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c5d\/f68\/4fa\/c5df684fa47248cfae4248273b825541.png\"\/>  <\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h3>\u0421\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h3>\n<p>  \u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044e \u043f\u0440\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435\u0442. \u0415\u0441\u0442\u044c \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0432\u0448\u0430\u044f\u0441\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"http:\/\/developer.android.com\/intl\/ru\/about\/versions\/marshmallow\/android-6.0-changes.html#behavior-text-selection\">\u0441\u0442\u0430\u0442\u044c\u044f \u043e \u043d\u043e\u0432\u0438\u043d\u043a\u0430\u0445 \u0432 Android Marshmallow<\/a>.<\/p>\n<p>  \u042f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u043b \u044d\u0442\u043e \u043c\u0435\u0441\u0442\u043e, \u043d\u043e \u0442\u0430\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0442\u043e, \u0447\u0442\u043e \u0442\u0430\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439. \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fe4\/764\/3bb\/fe47643bb9ea4057a932ebc025632552.png\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0441\u0430\u043c\u0438, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#startActionMode(android.view.ActionMode.Callback, int)\">startActionMode(callback, ActionMode.TYPE_FLOATING)<\/a> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 floating toolbar, \u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0434\u043b\u044f selection. \u0410 \u0434\u043b\u044f selection \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/TextView.html#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback)\">setCustomSelectionActionModeCallback()<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/990\/5b5\/6e9\/9905b56e9eca41d9b7c37e8adce01a82.png\"\/><\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f. \u041c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#startActionMode(android.view.ActionMode.Callback, int)\">setCustomSelectionActionModeCallback()<\/a> \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/TextView.html\">android.widget.TextView<\/a> \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback.html\">ActionMode.Callback<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/da0\/8d0\/2d2\/da08d02d251e483395913afeb99d457b.png\"\/><\/p>\n<p>  <a href=\"https:\/\/android.googlesource.com\/platform\/frameworks\/base\/+\/master\/core\/java\/android\/widget\/TextView.java\">android.googlesource.com\/platform\/frameworks\/base\/+\/master\/core\/java\/android\/widget\/TextView.java<\/a><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/android.googlesource.com\/platform\/frameworks\/base\/+\/master\/core\/java\/android\/widget\/Editor.java\">android.widget.Editor<\/a>, \u0442\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0435 \u043f\u043e\u043b\u0435 mCustomSelectionActionModeCallback \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback.html\">ActionMode.Callback<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/63a\/2ca\/45d\/63a2ca45d68f41f2a5c9869f78b8622e.png\"\/><\/p>\n<p>  \u0418 \u043d\u0438\u0433\u0434\u0435 \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e custom callback \u0431\u0443\u0434\u0435\u0442 \u0442\u0438\u043f\u0430 <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback2.html\">ActionMode.Callback2<\/a>. <br \/>  <a href=\"https:\/\/android.googlesource.com\/platform\/frameworks\/base\/+\/master\/core\/java\/android\/widget\/Editor.java\">android.googlesource.com\/platform\/frameworks\/base\/+\/master\/core\/java\/android\/widget\/Editor.java<\/a><\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0436\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0443\u043f\u043e\u0440\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback2.html\">ActionMode.Callback2<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/30b\/305\/001\/30b305001022424e9e1bb668957d5db9.png\"\/><\/p>\n<p>  \u041c\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e \u043d\u0435\u0434\u043e\u0441\u043c\u043e\u0442\u0440\u0443 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043f\u043e\u043f\u0430\u043b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e <a href=\"http:\/\/developer.android.com\/reference\/android\/view\/ActionMode.Callback2.html\">ActionMode.Callback2<\/a>. \u0415\u0441\u0442\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<h1>\u041f\u0440\u0438\u043c\u0435\u0440<\/h1>\n<p>  \u0426\u0435\u043b\u0438\u043a\u043e\u043c \u043a\u043e\u0434 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/JollyDroid\/MenuExample\">GitHub<\/a>.       <\/p>\n<div class=\"clear\"><\/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\/271737\/\"> http:\/\/habrahabr.ru\/post\/271737\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/hsto.org\/files\/bf6\/fcb\/9b3\/bf6fcb9b3830482981c710658371e364.gif\" align=\"right\"\/>\u0412 Android Marshmallow (SDK 23) \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430\u0434 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438\u00bb, \u00ab\u041f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb, \u00ab\u041f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb.<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043a \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044e \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/google\/blog\/270287\/\">GDG \u0432 \u041d\u0438\u0436\u043d\u0435\u043c \u041d\u043e\u0432\u0433\u043e\u0440\u043e\u0434\u0435<\/a> \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u044d\u0442\u0430 \u043d\u043e\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u0432 \u0441\u0435\u0442\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0449\u0435 \u043c\u0430\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u043c\u0443. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.  <\/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-269049","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269049","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=269049"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269049\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}