am 661a2669: Fixing the customize drawer tabs on large devices
* commit '661a26694250987cf71c69de0987e3fd209a0c6f': Fixing the customize drawer tabs on large devices
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/CustomizeTabIndicator.Wide" />
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright (C) 2008 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="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
|
||||
<item name="android:paddingLeft">20dp</item>
|
||||
<item name="android:paddingRight">20dp</item>
|
||||
<item name="android:paddingTop">12dp</item>
|
||||
<item name="android:paddingBottom">16dp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -41,4 +41,15 @@
|
||||
<item name="android:paddingTop">0dip</item>
|
||||
<item name="android:includeFontPadding">false</item>
|
||||
</style>
|
||||
|
||||
<style name="TabIndicator.Wide">
|
||||
<item name="android:paddingLeft">40dp</item>
|
||||
<item name="android:paddingRight">40dp</item>
|
||||
<item name="android:paddingTop">15dp</item>
|
||||
<item name="android:paddingBottom">20dp</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright (C) 2011 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="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
|
||||
</style>
|
||||
</resources>
|
||||
@@ -74,18 +74,23 @@ public class CustomizeTrayTabHost extends TabHost implements LauncherTransitiona
|
||||
TextView tabView;
|
||||
TabWidget tabWidget = (TabWidget) findViewById(com.android.internal.R.id.tabs);
|
||||
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView = (TextView) mInflater.inflate(
|
||||
R.layout.customize_tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(mContext.getString(R.string.widgets_tab_label));
|
||||
addTab(newTabSpec(WIDGETS_TAG).setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
addTab(newTabSpec(WIDGETS_TAG)
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(
|
||||
R.layout.customize_tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(mContext.getString(R.string.applications_tab_label));
|
||||
addTab(newTabSpec(APPLICATIONS_TAG)
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView = (TextView) mInflater.inflate(
|
||||
R.layout.customize_tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(mContext.getString(R.string.wallpapers_tab_label));
|
||||
addTab(newTabSpec(WALLPAPERS_TAG)
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView = (TextView) mInflater.inflate(
|
||||
R.layout.customize_tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(mContext.getString(R.string.shortcuts_tab_label));
|
||||
addTab(newTabSpec(SHORTCUTS_TAG)
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
|
||||
Reference in New Issue
Block a user