Fixing translateable attribute in strings, and click-through in AppsCustomize.
Change-Id: I8ceff05f5d38021c74731cddf71391b55049b2af
This commit is contained in:
parent
85b439c964
commit
4179b4e048
|
@ -21,16 +21,16 @@
|
|||
<!-- Manifest configuration. -->
|
||||
<skip />
|
||||
<!-- Do not translate. android:sharedUserId of this application. -->
|
||||
<string name="sharedUserId" translate="false"><xliff:g id="x"></xliff:g></string>
|
||||
<string name="sharedUserId" translatable="false"><xliff:g id="x"></xliff:g></string>
|
||||
<!-- Do not translate. android:process of this application. -->
|
||||
<string name="process" translate="false"><xliff:g id="x"></xliff:g></string>
|
||||
<string name="process" translatable="false"><xliff:g id="x"></xliff:g></string>
|
||||
|
||||
<!-- Do not translate. We wish to prioritize the Wallpaper and Live Wallpaper pickers,
|
||||
but because they are in a different package, we need to reference the component in
|
||||
a non language-dependent way. If the Live Wallpaper picker component name changes
|
||||
this will have to be updated as well. -->
|
||||
<string name="live_wallpaper_picker_package_name" translate="false">com.android.wallpaper.livepicker</string>
|
||||
<string name="live_wallpaper_picker_class_name" translate="false">com.android.wallpaper.livepicker.LiveWallpaperActivity</string>
|
||||
<string name="live_wallpaper_picker_package_name" translatable="false">com.android.wallpaper.livepicker</string>
|
||||
<string name="live_wallpaper_picker_class_name" translatable="false">com.android.wallpaper.livepicker.LiveWallpaperActivity</string>
|
||||
|
||||
<!-- General -->
|
||||
<skip />
|
||||
|
|
|
@ -20,6 +20,7 @@ import android.content.Context;
|
|||
import android.content.res.Resources;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TabHost;
|
||||
|
@ -36,6 +37,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
|
|||
private static final String WALLPAPERS_TAB_TAG = "WALLPAPERS";
|
||||
|
||||
private final LayoutInflater mLayoutInflater;
|
||||
private AppsCustomizePagedView mAppsCustomizePane;
|
||||
|
||||
public AppsCustomizeTabHost(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
@ -58,15 +60,16 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
|
|||
setup();
|
||||
|
||||
final ViewGroup tabs = (ViewGroup) findViewById(com.android.internal.R.id.tabs);
|
||||
final AppsCustomizePagedView content = (AppsCustomizePagedView)
|
||||
final AppsCustomizePagedView appsCustomizePane = (AppsCustomizePagedView)
|
||||
findViewById(R.id.apps_customize_pane_content);
|
||||
if (tabs == null || content == null) throw new Resources.NotFoundException();
|
||||
mAppsCustomizePane = appsCustomizePane;
|
||||
if (tabs == null || mAppsCustomizePane == null) throw new Resources.NotFoundException();
|
||||
|
||||
// Configure the tabs content factory to return the same paged view (that we change the
|
||||
// content filter on)
|
||||
TabContentFactory contentFactory = new TabContentFactory() {
|
||||
public View createTabContent(String tag) {
|
||||
return content;
|
||||
return appsCustomizePane;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -84,14 +87,22 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
|
|||
setOnTabChangedListener(this);
|
||||
|
||||
// Set the width of the tab bar to match the content (for now)
|
||||
tabs.getLayoutParams().width = content.getPageContentWidth();
|
||||
tabs.getLayoutParams().width = mAppsCustomizePane.getPageContentWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
// Intercept all touch events up to the bottom of the AppsCustomizePane so they do not fall
|
||||
// through to the workspace and trigger showWorkspace()
|
||||
if (event.getY() < mAppsCustomizePane.getBottom()) {
|
||||
return true;
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabChanged(String tabId) {
|
||||
final AppsCustomizePagedView content = (AppsCustomizePagedView)
|
||||
findViewById(R.id.apps_customize_pane_content);
|
||||
content.setContentType(getContentTypeForTabTag(tabId));
|
||||
mAppsCustomizePane.setContentType(getContentTypeForTabTag(tabId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -613,10 +613,15 @@ public class Workspace extends SmoothPagedView
|
|||
if (mLauncher.isAllAppsVisible() && mShrinkState == ShrinkState.BOTTOM_HIDDEN) {
|
||||
// Intercept this event so we can show the workspace in full view
|
||||
// when it is clicked on and it is small
|
||||
AllAppsPagedView allApps = (AllAppsPagedView)
|
||||
mLauncher.findViewById(R.id.all_apps_paged_view);
|
||||
if (allApps != null) {
|
||||
allApps.onInterceptTouchEvent(ev);
|
||||
PagedView appsPane = null;
|
||||
if (LauncherApplication.isScreenLarge()) {
|
||||
appsPane = (PagedView) mLauncher.findViewById(R.id.all_apps_paged_view);
|
||||
} else {
|
||||
appsPane = (PagedView) mLauncher.findViewById(R.id.apps_customize_pane_content);
|
||||
}
|
||||
|
||||
if (appsPane != null) {
|
||||
appsPane.onInterceptTouchEvent(ev);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue