Revert "Tinted icons sample"
This reverts commit 8e7ff4c3f2.
Change-Id: I011cc2afc4de0a572f42faaa4b19b90ba661140c
This commit is contained in:
@@ -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">
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 202 B |
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user