Merge branch 'master' into honeycomb-release
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="#FFEFEFEF" />
|
||||
<item android:color="#909090" />
|
||||
</selector>
|
||||
|
After Width: | Height: | Size: 218 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 522 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 147 B |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 265 B |
|
After Width: | Height: | Size: 203 B |
|
After Width: | Height: | Size: 144 B |
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 231 B |
|
After Width: | Height: | Size: 196 B |
|
After Width: | Height: | Size: 459 B |
|
After Width: | Height: | Size: 223 B |
@@ -0,0 +1,34 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Non focused states -->
|
||||
<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_holo" />
|
||||
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_holo" />
|
||||
|
||||
<!-- Focused states -->
|
||||
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_focused_holo" />
|
||||
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_holo" />
|
||||
|
||||
<!-- Pressed -->
|
||||
<!-- Non focused states -->
|
||||
<item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_holo" />
|
||||
<item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" />
|
||||
|
||||
<!-- Focused states -->
|
||||
<item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_focused_holo" />
|
||||
<item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_focused_holo" />
|
||||
</selector>
|
||||
@@ -50,7 +50,7 @@
|
||||
launcher:cellCountY="5"
|
||||
launcher:pageLayoutWidthGap="36dp"
|
||||
launcher:pageLayoutHeightGap="6dp"
|
||||
launcher:pageLayoutPaddingTop="15dp"
|
||||
launcher:pageLayoutPaddingTop="20dp"
|
||||
launcher:pageLayoutPaddingBottom="15dp"
|
||||
launcher:pageLayoutPaddingLeft="40dp"
|
||||
launcher:pageLayoutPaddingRight="40dp">
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
<TabHost
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="460dp"
|
||||
android:layout_height="480dp"
|
||||
android:layout_gravity="bottom">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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"
|
||||
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingRight="40dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="20dp"
|
||||
|
||||
android:textColor="@color/tab_widget_indicator_color"
|
||||
android:background="@drawable/tab_widget_indicator_selector"
|
||||
android:textSize="20sp"
|
||||
android:shadowColor="#393939"
|
||||
android:shadowDx="0.0"
|
||||
android:shadowDy="1.0"
|
||||
android:shadowRadius="1.0" />
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.android.launcher2;
|
||||
|
||||
import com.android.launcher.R;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
@@ -25,11 +25,14 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TabWidget;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import com.android.launcher.R;
|
||||
|
||||
/**
|
||||
* Implements a tabbed version of AllApps2D.
|
||||
@@ -43,10 +46,12 @@ public class AllAppsTabbed extends TabHost implements AllAppsView {
|
||||
|
||||
private AllAppsPagedView mAllApps;
|
||||
private Context mContext;
|
||||
private final LayoutInflater mInflater;
|
||||
|
||||
public AllAppsTabbed(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mContext = context;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,11 +73,15 @@ public class AllAppsTabbed extends TabHost implements AllAppsView {
|
||||
}
|
||||
};
|
||||
|
||||
String label = mContext.getString(R.string.all_apps_tab_all);
|
||||
addTab(newTabSpec(TAG_ALL).setIndicator(label).setContent(contentFactory));
|
||||
TextView tabView;
|
||||
TabWidget tabWidget = (TabWidget) findViewById(com.android.internal.R.id.tabs);
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(mContext.getString(R.string.all_apps_tab_all));
|
||||
addTab(newTabSpec(TAG_ALL).setIndicator(tabView).setContent(contentFactory));
|
||||
|
||||
label = mContext.getString(R.string.all_apps_tab_downloaded);
|
||||
addTab(newTabSpec(TAG_DOWNLOADED).setIndicator(label).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(mContext.getString(R.string.all_apps_tab_downloaded));
|
||||
addTab(newTabSpec(TAG_DOWNLOADED).setIndicator(tabView).setContent(contentFactory));
|
||||
|
||||
setOnTabChangedListener(new OnTabChangeListener() {
|
||||
public void onTabChanged(String tabId) {
|
||||
|
||||
@@ -99,6 +99,7 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TabWidget;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.TabHost.OnTabChangeListener;
|
||||
@@ -306,18 +307,27 @@ public final class Launcher extends Activity
|
||||
}
|
||||
};
|
||||
|
||||
String widgetsLabel = getString(R.string.widgets_tab_label);
|
||||
|
||||
TextView tabView;
|
||||
TabWidget tabWidget = (TabWidget)
|
||||
mHomeCustomizationDrawer.findViewById(com.android.internal.R.id.tabs);
|
||||
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(getString(R.string.widgets_tab_label));
|
||||
mHomeCustomizationDrawer.addTab(mHomeCustomizationDrawer.newTabSpec(WIDGETS_TAG)
|
||||
.setIndicator(widgetsLabel).setContent(contentFactory));
|
||||
String applicationsLabel = getString(R.string.applications_tab_label);
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(getString(R.string.applications_tab_label));
|
||||
mHomeCustomizationDrawer.addTab(mHomeCustomizationDrawer.newTabSpec(APPLICATIONS_TAG)
|
||||
.setIndicator(applicationsLabel).setContent(contentFactory));
|
||||
String wallpapersLabel = getString(R.string.wallpapers_tab_label);
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(getString(R.string.wallpapers_tab_label));
|
||||
mHomeCustomizationDrawer.addTab(mHomeCustomizationDrawer.newTabSpec(WALLPAPERS_TAG)
|
||||
.setIndicator(wallpapersLabel).setContent(contentFactory));
|
||||
String shortcutsLabel = getString(R.string.shortcuts_tab_label);
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
|
||||
tabView.setText(getString(R.string.shortcuts_tab_label));
|
||||
mHomeCustomizationDrawer.addTab(mHomeCustomizationDrawer.newTabSpec(SHORTCUTS_TAG)
|
||||
.setIndicator(shortcutsLabel).setContent(contentFactory));
|
||||
.setIndicator(tabView).setContent(contentFactory));
|
||||
mHomeCustomizationDrawer.setOnTabChangedListener(new OnTabChangeListener() {
|
||||
public void onTabChanged(String tabId) {
|
||||
// animate the changing of the tab content by fading pages in and out
|
||||
|
||||