diff options
author | Chris Banes <chrisbanes@google.com> | 2015-06-11 08:32:28 +0000 |
---|---|---|
committer | Chris Banes <chrisbanes@google.com> | 2015-06-11 08:32:41 +0000 |
commit | 28701d108d839ee157c0cae85bb8f3148d4ff3dc (patch) | |
tree | 8a0c84a94d31ca8de14c29f3eaec2b4a2627628f | |
parent | d18f135ae2d1d60190dea4195583509d9ef22913 (diff) | |
download | android_development-28701d108d839ee157c0cae85bb8f3148d4ff3dc.tar.gz android_development-28701d108d839ee157c0cae85bb8f3148d4ff3dc.tar.bz2 android_development-28701d108d839ee157c0cae85bb8f3148d4ff3dc.zip |
Revert "Tinted icons sample"
This reverts commit 8e7ff4c3f20f8a167f1ce534b767714119f263eb.
Change-Id: I011cc2afc4de0a572f42faaa4b19b90ba661140c
-rw-r--r-- | samples/Support7Demos/AndroidManifest.xml | 18 | ||||
-rw-r--r-- | samples/Support7Demos/res/drawable-hdpi/ic_edit.png | bin | 202 -> 0 bytes | |||
-rw-r--r-- | samples/Support7Demos/res/layout/toolbar_tint_icons.xml | 55 | ||||
-rw-r--r-- | samples/Support7Demos/res/menu/actions_tint.xml | 32 | ||||
-rw-r--r-- | samples/Support7Demos/res/values/strings.xml | 7 | ||||
-rw-r--r-- | samples/Support7Demos/src/com/example/android/supportv7/app/ActionBarTintIcons.java | 55 | ||||
-rw-r--r-- | samples/Support7Demos/src/com/example/android/supportv7/app/ToolbarTintIcons.java | 75 |
7 files changed, 0 insertions, 242 deletions
diff --git a/samples/Support7Demos/AndroidManifest.xml b/samples/Support7Demos/AndroidManifest.xml index f48500ad5..288b124e8 100644 --- a/samples/Support7Demos/AndroidManifest.xml +++ b/samples/Support7Demos/AndroidManifest.xml @@ -176,15 +176,6 @@ </intent-filter> </activity> - <activity android:name=".app.ActionBarTintIcons" - android:label="@string/action_bar_tint_icons" - android:theme="@style/Theme.AppCompat.Light"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="com.example.android.supportv7.SAMPLE_CODE" /> - </intent-filter> - </activity> - <activity android:name=".app.ActionBarSettingsActionProviderActivity" android:label="@string/action_bar_settings_action_provider" android:theme="@style/Theme.AppCompat.Light.DarkActionBar"> @@ -307,15 +298,6 @@ </intent-filter> </activity> - <activity android:name=".app.ToolbarTintIcons" - android:label="@string/toolbar_icon_tint" - android:theme="@style/Theme.AppCompat.Light.NoActionBar"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="com.example.android.supportv7.SAMPLE_CODE" /> - </intent-filter> - </activity> - <activity android:name=".app.DialogUsage" android:label="@string/dialog_usage" android:theme="@style/Theme.AppCompat.Light"> diff --git a/samples/Support7Demos/res/drawable-hdpi/ic_edit.png b/samples/Support7Demos/res/drawable-hdpi/ic_edit.png Binary files differdeleted file mode 100644 index b900af02c..000000000 --- a/samples/Support7Demos/res/drawable-hdpi/ic_edit.png +++ /dev/null diff --git a/samples/Support7Demos/res/layout/toolbar_tint_icons.xml b/samples/Support7Demos/res/layout/toolbar_tint_icons.xml deleted file mode 100644 index ee30e063b..000000000 --- a/samples/Support7Demos/res/layout/toolbar_tint_icons.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2015 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. ---> - -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:background="?attr/colorPrimary" - app:navigationTint="#FF0000" - app:overflowTint="#0000FF"/> - - <Button - android:id="@+id/btn_tint_navigation" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/tint_navigation"/> - - <Button - android:id="@+id/btn_tint_navigation_clear" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/tint_navigation_clear"/> - - <Button - android:id="@+id/btn_tint_overflow" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/tint_overflow"/> - - <Button - android:id="@+id/btn_tint_overflow_clear" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/tint_overflow_clear"/> - -</LinearLayout>
\ No newline at end of file diff --git a/samples/Support7Demos/res/menu/actions_tint.xml b/samples/Support7Demos/res/menu/actions_tint.xml deleted file mode 100644 index b218697fe..000000000 --- a/samples/Support7Demos/res/menu/actions_tint.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2015 Google Inc. - - 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" - xmlns:app="http://schemas.android.com/apk/res-auto"> - <item android:id="@+id/action_search" - android:title="@string/action_bar_search" - android:icon="@drawable/abc_ic_search_api_mtrl_alpha" - app:showAsAction="always" - app:iconTint="#FF0000"/> - - <item android:id="@+id/action_edit" - android:title="@string/action_bar_edit" - android:icon="@drawable/ic_edit" - app:showAsAction="always"/> - - <item android:id="@+id/action_force_overflow" - android:title="@string/dummy" - app:showAsAction="never"/> -</menu> diff --git a/samples/Support7Demos/res/values/strings.xml b/samples/Support7Demos/res/values/strings.xml index d9d8fe072..accf739d1 100644 --- a/samples/Support7Demos/res/values/strings.xml +++ b/samples/Support7Demos/res/values/strings.xml @@ -62,7 +62,6 @@ <string name="appcompat_widgets_buttons">AppCompat/Widgets/Buttons</string> <string name="appcompat_widgets_spinners">AppCompat/Widgets/Spinners</string> <string name="appcompat_widgets_text_input">AppCompat/Widgets/Text Input</string> - <string name="action_bar_tint_icons">AppCompat/Action Bar/Tinted Icons</string> <string name="action_bar_search">Search</string> <string name="action_bar_add">Add</string> @@ -133,7 +132,6 @@ <string name="toolbar_display_options">AppCompat/Toolbar/Toolbar Display Options</string> <string name="toolbar_fragment_pager">AppCompat/Toolbar/Toolbar Fragment ViewPager</string> <string name="toolbar_action_mode">AppCompat/Toolbar/Action Mode</string> - <string name="toolbar_icon_tint">AppCompat/Toolbar/Tinted Icons</string> <string name="dialog_usage">AppCompat/Dialog/Dialog Usage</string> <string name="dialog_title">My great dialog</string> @@ -183,11 +181,6 @@ <string name="sorted_list_activity">Sorted List</string> <string name="add_new_item">Add New Item</string> <string name="start_action_mode">Start Action Mode</string> - <string name="tint_navigation">Tint navigation button</string> - <string name="tint_navigation_clear">Clear navigation button tint</string> - <string name="tint_overflow">Tint overflow button</string> - <string name="tint_overflow_clear">Clear overflow button tint</string> - <string name="dummy">Dummy item</string> <string name="swipe_to_dismiss_activity">RecyclerView/ItemTouchHelper/Swipe To Dismiss</string> <string name="drag_and_drop_activity">RecyclerView/ItemTouchHelper/Drag and Drop Activity</string> diff --git a/samples/Support7Demos/src/com/example/android/supportv7/app/ActionBarTintIcons.java b/samples/Support7Demos/src/com/example/android/supportv7/app/ActionBarTintIcons.java deleted file mode 100644 index b8d647298..000000000 --- a/samples/Support7Demos/src/com/example/android/supportv7/app/ActionBarTintIcons.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2015 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.supportv7.app; - -import com.example.android.supportv7.R; - -import android.content.res.ColorStateList; -import android.graphics.Color; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.support.v4.view.MenuItemCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.SearchView; -import android.text.TextUtils; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.MenuItem; -import android.widget.TextView; -import android.widget.Toast; - -/** - * This demonstrates the use of tinted menu items, both via menu resources and dynamically via - * MenuItemCompat. - */ -public class ActionBarTintIcons extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.actions_tint, menu); - - MenuItem item = menu.findItem(R.id.action_edit); - MenuItemCompat.setIconTintList(item, ColorStateList.valueOf(Color.GREEN)); - - return true; - } -} diff --git a/samples/Support7Demos/src/com/example/android/supportv7/app/ToolbarTintIcons.java b/samples/Support7Demos/src/com/example/android/supportv7/app/ToolbarTintIcons.java deleted file mode 100644 index 150cbd5d2..000000000 --- a/samples/Support7Demos/src/com/example/android/supportv7/app/ToolbarTintIcons.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2015 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.supportv7.app; - -import com.example.android.supportv7.R; - -import android.content.res.ColorStateList; -import android.graphics.Color; -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.Menu; -import android.view.View; - -/** - * This demonstrates the use of tinted navigation and overflow items. - */ -public class ToolbarTintIcons extends AppCompatActivity implements View.OnClickListener { - - private Toolbar mToolbar; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.toolbar_tint_icons); - - mToolbar = (Toolbar) findViewById(R.id.toolbar); - setSupportActionBar(mToolbar); - - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - - findViewById(R.id.btn_tint_navigation).setOnClickListener(this); - findViewById(R.id.btn_tint_navigation_clear).setOnClickListener(this); - findViewById(R.id.btn_tint_overflow).setOnClickListener(this); - findViewById(R.id.btn_tint_overflow_clear).setOnClickListener(this); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.actions_tint, menu); - return true; - } - - @Override - public void onClick(View v) { - switch (v.getId()) { - case R.id.btn_tint_navigation: - mToolbar.setNavigationTintList(ColorStateList.valueOf(Color.BLUE)); - break; - case R.id.btn_tint_navigation_clear: - mToolbar.setNavigationTintList(null); - break; - case R.id.btn_tint_overflow: - mToolbar.setOverflowTintList(ColorStateList.valueOf(Color.RED)); - break; - case R.id.btn_tint_overflow_clear: - mToolbar.setOverflowTintList(null); - break; - } - } -} |