Merge "Borderless Buttons sample" into jb-mr2-dev
diff --git a/ui/holo/BorderlessButtons/AndroidManifest.xml b/ui/holo/BorderlessButtons/AndroidManifest.xml
new file mode 100755
index 0000000..34b2898
--- /dev/null
+++ b/ui/holo/BorderlessButtons/AndroidManifest.xml
@@ -0,0 +1,48 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.borderlessbuttons"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <!--
+      This sample requires API 11 for use of theme attributes such as ?android:buttonBarStyle
+      and ?android:borderlessButtonStyle, as well as LinearLayout's android:showDividers attribute.
+      A similar effect can be achieved by setting a clickable view's background to
+      ?android:selectableItemBackground.
+
+      This sample requires API 14 for use of theme attributes such as
+      ?android:listPreferredItemPaddingLeft.
+    -->
+    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample"
+        android:allowBackup="true">
+
+        <activity android:name=".MainActivity"
+            android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+    </application>
+
+</manifest>
diff --git a/ui/holo/BorderlessButtons/big_icon.png b/ui/holo/BorderlessButtons/big_icon.png
new file mode 100644
index 0000000..a8b32a9
--- /dev/null
+++ b/ui/holo/BorderlessButtons/big_icon.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-hdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/res/drawable-hdpi/ic_action_delete.png
new file mode 100644
index 0000000..e9ce89e
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-hdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-hdpi/ic_launcher.png b/ui/holo/BorderlessButtons/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..05591fd
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-mdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/res/drawable-mdpi/ic_action_delete.png
new file mode 100644
index 0000000..cedb108
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-mdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-mdpi/ic_launcher.png b/ui/holo/BorderlessButtons/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..ed81674
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-xhdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/res/drawable-xhdpi/ic_action_delete.png
new file mode 100644
index 0000000..98c73da
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-xhdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-xhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..0fef898
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/drawable-xxhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..cccd5d4
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/res/layout/activity_main.xml b/ui/holo/BorderlessButtons/res/layout/activity_main.xml
new file mode 100755
index 0000000..eacbf4b
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/layout/activity_main.xml
@@ -0,0 +1,87 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<!--
+    The top-level LinearLayout uses a horizontal divider to visually
+    distinguish the top description box, list, and bottom button bar.
+
+    android:showDividers="middle" draws dividers between each child view and
+    android:divider="?android:dividerHorizontal" indicates that the standard
+    horizontal system divider (set in the activity's theme) should be used to
+    draw the divider.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:divider="?android:dividerHorizontal"
+    android:showDividers="middle">
+
+    <TextView style="@style/Widget.DescriptionBar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/intro_message" />
+
+    <!--
+        Remember to use padding on your ListViews to adhere to the standard
+        metrics described in the Android Design guidelines. When doing so,
+        you should set the android:scrollbarStyle such that the scrollbar
+        doesn'isn't inset.
+    -->
+    <ListView android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:paddingLeft="@dimen/page_margin"
+        android:paddingRight="@dimen/page_margin"
+        android:scrollbarStyle="outsideOverlay" />
+
+    <!--
+        When using the Holo theme (setting your activity or app theme to
+        Theme.Holo or one of its descendants), a LinearLayout with the
+        ?android:buttonBarStyle will draw dividers (with padding) between
+        buttons.
+    -->
+    <LinearLayout style="?android:buttonBarStyle"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+
+        <!--
+            Make sure to apply the ?android:buttonBarStyle to each button
+            in the button bar.
+
+            In the Holo theme, this style is very similar to
+            ?android:borderlessButtonStyle, but designed for use specifically
+            in horizontal button bars.
+        -->
+        <Button style="?android:buttonBarButtonStyle"
+            android:id="@+id/cancel_button"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/cancel" />
+
+        <Button style="?android:buttonBarButtonStyle"
+            android:id="@+id/ok_button"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/ok" />
+
+    </LinearLayout>
+
+</LinearLayout>
diff --git a/ui/holo/BorderlessButtons/res/layout/list_item.xml b/ui/holo/BorderlessButtons/res/layout/list_item.xml
new file mode 100644
index 0000000..1966be9
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/layout/list_item.xml
@@ -0,0 +1,87 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<!--
+    For list items that contain secondary actions (in this case, 'delete'),
+    it's important to use dividers to distinguish the primary touch target from
+    the secondary action. This is done using android:showDividers and its
+    related attributes.
+
+    The android:dividerPadding attribute insets the divider line by the given
+    amount on each side (in this case, top and bottom). Divider padding helps
+    establish visual hierarchy when several dividers are used in a screen. In
+    this case, the padding helps separate this vertical divider from horizontal
+    list item separators in the main ListView, and establishes a stronger
+    relationship between the delete action and the primary target to its left.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:listPreferredItemHeight"
+    android:divider="?android:dividerVertical"
+    android:dividerPadding="8dp"
+    android:showDividers="middle">
+
+    <!--
+        Any view or view group can become interactive by simply setting the
+        android:clickable and android:focusable attributes to true.
+
+        When doing this, make sure to provide adequate touch feedback by also
+        setting the view background to ?android:selectableItemBackground. When
+        using the Holo theme, this drawable is transparent by default, but
+        changes to a translucent color overlay when the view is pressed or
+        focused.
+    -->
+    <LinearLayout android:id="@+id/primary_target"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:orientation="vertical"
+        android:paddingLeft="?android:listPreferredItemPaddingLeft"
+        android:paddingRight="?android:listPreferredItemPaddingRight"
+        android:clickable="true"
+        android:focusable="true"
+        android:gravity="center_vertical"
+        android:background="?android:selectableItemBackground">
+
+        <TextView style="?android:textAppearanceListItemSmall"
+            android:id="@android:id/text1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/dummy_title" />
+
+        <TextView style="?android:textAppearanceSmall"
+            android:id="@android:id/text2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/dummy_subtitle" />
+
+    </LinearLayout>
+
+    <!--
+        When using the Holo theme, setting a Button or ImageButton to
+        ?android:borderlessButtonStyle removes its border and sets the
+        background to ?android:selectableItemBackground, as described above.
+    -->
+    <ImageButton android:id="@+id/secondary_action"
+        style="?android:borderlessButtonStyle"
+        android:layout_width="@dimen/standard_touch_target_size"
+        android:layout_height="match_parent"
+        android:src="@drawable/ic_action_delete"
+        android:contentDescription="@string/delete_content_description" />
+
+</LinearLayout>
diff --git a/ui/holo/BorderlessButtons/res/menu/main.xml b/ui/holo/BorderlessButtons/res/menu/main.xml
new file mode 100644
index 0000000..54f0d3f
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/menu/main.xml
@@ -0,0 +1,22 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:id="@+id/docs_link"
+        android:title="@string/docs_link_title"
+        android:showAsAction="never" />
+</menu>
diff --git a/ui/holo/BorderlessButtons/res/values-sw600dp/dimens.xml b/ui/holo/BorderlessButtons/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..0e00174
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/values-sw600dp/dimens.xml
@@ -0,0 +1,21 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <dimen name="page_margin">@dimen/margin_huge</dimen>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/res/values-sw600dp/styles.xml b/ui/holo/BorderlessButtons/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..9ce5eb3
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/values-sw600dp/styles.xml
@@ -0,0 +1,29 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <style name="Widget.DescriptionBar">
+        <item name="android:background">#fb3</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/page_margin</item>
+        <item name="android:paddingRight">@dimen/page_margin</item>
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
+    </style>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/res/values/dimens.xml b/ui/holo/BorderlessButtons/res/values/dimens.xml
new file mode 100644
index 0000000..be5bb40
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/values/dimens.xml
@@ -0,0 +1,33 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_tiny">4dp</dimen>
+    <dimen name="margin_small">8dp</dimen>
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_large">32dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+    <dimen name="standard_touch_target_size">48dp</dimen>
+
+    <!-- Meta-dimension that switches on screen size -->
+
+    <dimen name="page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/res/values/strings.xml b/ui/holo/BorderlessButtons/res/values/strings.xml
new file mode 100755
index 0000000..c685088
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/values/strings.xml
@@ -0,0 +1,33 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+    <string name="app_name">Borderless Buttons</string>
+    <string name="intro_message">This sample demonstrates the use of <b>borderless buttons</b>, <b>bottom button bars</b> (<i>OK</i> and <i>Cancel</i>) and <b>dividers</b> to establish visual structure.</string>
+
+    <string name="cancel">Cancel</string>
+    <string name="ok">OK</string>
+
+    <string name="dummy_title">Dummy title</string>
+    <string name="dummy_subtitle">Dummy subtitle</string>
+
+    <string name="delete_content_description">Delete</string>
+
+    <string name="touched_primary_message">Touched primary list item target.</string>
+    <string name="touched_secondary_message">Touched secondary list item target (delete).</string>
+
+    <string name="docs_link_title">Design docs: borderless buttons</string>
+</resources>
diff --git a/ui/holo/BorderlessButtons/res/values/styles.xml b/ui/holo/BorderlessButtons/res/values/styles.xml
new file mode 100644
index 0000000..469816c
--- /dev/null
+++ b/ui/holo/BorderlessButtons/res/values/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  Copyright 2013 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.DescriptionBar">
+        <item name="android:background">#fb3</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/page_margin</item>
+        <item name="android:paddingRight">@dimen/page_margin</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/src/com/example/android/borderlessbuttons/MainActivity.java b/ui/holo/BorderlessButtons/src/com/example/android/borderlessbuttons/MainActivity.java
new file mode 100755
index 0000000..9f27997
--- /dev/null
+++ b/ui/holo/BorderlessButtons/src/com/example/android/borderlessbuttons/MainActivity.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.borderlessbuttons;
+
+import android.app.ListActivity;
+import android.content.ActivityNotFoundException;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.Toast;
+
+/**
+ * This activity demonstrates the <b>borderless button</b> styling from the Holo visual language.
+ * The most interesting bits in this sample are in the layout files (res/layout/).
+ * <p>
+ * See <a href="http://developer.android.com/design/building-blocks/buttons.html#borderless">
+ * borderless buttons</a> at the Android Design guide for a discussion of this visual style.
+ */
+public class MainActivity extends ListActivity {
+    private static final Uri DOCS_URI = Uri.parse(
+            "http://developer.android.com/design/building-blocks/buttons.html#borderless");
+
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        setListAdapter(mListAdapter);
+
+        findViewById(R.id.cancel_button).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                finish();
+            }
+        });
+
+        findViewById(R.id.ok_button).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                finish();
+            }
+        });
+    }
+
+    private BaseAdapter mListAdapter = new BaseAdapter() {
+        @Override
+        public int getCount() {
+            return 10;
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return null;
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return position + 1;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup container) {
+            if (convertView == null) {
+                convertView = getLayoutInflater().inflate(R.layout.list_item, container, false);
+            }
+
+            // Because the list item contains multiple touch targets, you should not override
+            // onListItemClick. Instead, set a click listener for each target individually.
+
+            convertView.findViewById(R.id.primary_target).setOnClickListener(
+                    new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            Toast.makeText(MainActivity.this,
+                                    R.string.touched_primary_message,
+                                    Toast.LENGTH_SHORT).show();
+                        }
+                    });
+
+            convertView.findViewById(R.id.secondary_action).setOnClickListener(
+                    new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            Toast.makeText(MainActivity.this,
+                                    R.string.touched_secondary_message,
+                                    Toast.LENGTH_SHORT).show();
+                        }
+                    });
+            return convertView;
+        }
+    };
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.docs_link:
+                try {
+                    startActivity(new Intent(Intent.ACTION_VIEW, DOCS_URI));
+                } catch (ActivityNotFoundException ignored) {
+                }
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}