зеркало из https://github.com/mozilla/gecko-dev.git
Bug 852312: Move the custom views in about:home to widget directory. [r=bnicholson]
--HG-- rename : mobile/android/base/AboutHomeContent.java => mobile/android/base/widget/AboutHomeContent.java rename : mobile/android/base/AboutHomePromoBox.java => mobile/android/base/widget/AboutHomePromoBox.java rename : mobile/android/base/AboutHomeSection.java => mobile/android/base/widget/AboutHomeSection.java rename : mobile/android/base/LinkTextView.java => mobile/android/base/widget/LinkTextView.java extra : rebase_source : b13d18d3b2c56e8fec364265fe46ee88771f7ed2
This commit is contained in:
Родитель
eadf5f190e
Коммит
e78fbba920
|
@ -28,7 +28,7 @@ import java.util.List;
|
|||
import java.util.concurrent.SynchronousQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
class ActivityHandlerHelper {
|
||||
public class ActivityHandlerHelper {
|
||||
private static final String LOGTAG = "GeckoActivityHandlerHelper";
|
||||
|
||||
private final SynchronousQueue<String> mFilePickerResult;
|
||||
|
@ -39,7 +39,7 @@ class ActivityHandlerHelper {
|
|||
private final CameraImageResultHandler mCameraImageResultHandler;
|
||||
private final CameraVideoResultHandler mCameraVideoResultHandler;
|
||||
|
||||
ActivityHandlerHelper() {
|
||||
public ActivityHandlerHelper() {
|
||||
mFilePickerResult = new SynchronousQueue<String>();
|
||||
mActivityResultHandlerMap = new ActivityResultHandlerMap();
|
||||
mFilePickerResultHandlerSync = new FilePickerResultHandlerSync(mFilePickerResult);
|
||||
|
@ -48,11 +48,11 @@ class ActivityHandlerHelper {
|
|||
mCameraVideoResultHandler = new CameraVideoResultHandler(mFilePickerResult);
|
||||
}
|
||||
|
||||
int makeRequestCodeForAwesomebar() {
|
||||
public int makeRequestCodeForAwesomebar() {
|
||||
return mActivityResultHandlerMap.put(mAwesomebarResultHandler);
|
||||
}
|
||||
|
||||
int makeRequestCode(ActivityResultHandler aHandler) {
|
||||
public int makeRequestCode(ActivityResultHandler aHandler) {
|
||||
return mActivityResultHandlerMap.put(aHandler);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,13 +56,13 @@ public class AwesomeBar extends GeckoActivity {
|
|||
InputMethods.METHOD_SWYPE_BETA,
|
||||
});
|
||||
|
||||
static final String URL_KEY = "url";
|
||||
static final String CURRENT_URL_KEY = "currenturl";
|
||||
static final String TARGET_KEY = "target";
|
||||
static final String SEARCH_KEY = "search";
|
||||
static final String TITLE_KEY = "title";
|
||||
static final String USER_ENTERED_KEY = "user_entered";
|
||||
static final String READING_LIST_KEY = "reading_list";
|
||||
public static final String URL_KEY = "url";
|
||||
public static final String CURRENT_URL_KEY = "currenturl";
|
||||
public static final String TARGET_KEY = "target";
|
||||
public static final String SEARCH_KEY = "search";
|
||||
public static final String TITLE_KEY = "title";
|
||||
public static final String USER_ENTERED_KEY = "user_entered";
|
||||
public static final String READING_LIST_KEY = "reading_list";
|
||||
public static enum Target { NEW_TAB, CURRENT_TAB, PICK_SITE };
|
||||
|
||||
private String mTarget;
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.mozilla.gecko.util.FloatUtils;
|
|||
import org.mozilla.gecko.util.GamepadUtils;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
import org.mozilla.gecko.util.UiAsyncTask;
|
||||
import org.mozilla.gecko.widget.AboutHomeContent;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
|
@ -150,7 +150,7 @@ public class GeckoAppShell
|
|||
|
||||
private static boolean mLocationHighAccuracy = false;
|
||||
|
||||
static ActivityHandlerHelper sActivityHelper = new ActivityHandlerHelper();
|
||||
public static ActivityHandlerHelper sActivityHelper = new ActivityHandlerHelper();
|
||||
static NotificationClient sNotificationClient;
|
||||
|
||||
/* The Android-side API: API methods that Android calls */
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.gfx.LayerView;
|
||||
import org.mozilla.gecko.widget.AboutHomeContent;
|
||||
import org.mozilla.gecko.widget.AboutHomePromoBox;
|
||||
import org.mozilla.gecko.widget.AboutHomeSection;
|
||||
import org.mozilla.gecko.widget.IconTabWidget;
|
||||
import org.mozilla.gecko.widget.LinkTextView;
|
||||
import org.mozilla.gecko.widget.TabRow;
|
||||
import org.mozilla.gecko.widget.ThumbnailView;
|
||||
|
||||
|
|
|
@ -43,9 +43,6 @@ UTIL_JAVA_FILES := \
|
|||
$(NULL)
|
||||
|
||||
FENNEC_JAVA_FILES = \
|
||||
AboutHomeContent.java \
|
||||
AboutHomePromoBox.java \
|
||||
AboutHomeSection.java \
|
||||
ActivityHandlerHelper.java \
|
||||
AlertNotification.java \
|
||||
AllCapsTextView.java \
|
||||
|
@ -113,7 +110,6 @@ FENNEC_JAVA_FILES = \
|
|||
LightweightTheme.java \
|
||||
LightweightThemeDrawable.java \
|
||||
LinkPreference.java \
|
||||
LinkTextView.java \
|
||||
MemoryMonitor.java \
|
||||
MenuButton.java \
|
||||
MenuItemActionBar.java \
|
||||
|
@ -201,8 +197,12 @@ FENNEC_JAVA_FILES = \
|
|||
gfx/TouchEventHandler.java \
|
||||
gfx/ViewTransform.java \
|
||||
gfx/VirtualLayer.java \
|
||||
widget/AboutHomeContent.java \
|
||||
widget/AboutHomePromoBox.java \
|
||||
widget/AboutHomeSection.java \
|
||||
widget/DateTimePicker.java \
|
||||
widget/IconTabWidget.java \
|
||||
widget/LinkTextView.java \
|
||||
widget/TabRow.java \
|
||||
widget/ThumbnailView.java \
|
||||
widget/TwoWayView.java \
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
* applied between thumbnail processing. This allows a single thumbnail buffer to
|
||||
* be used for all thumbnails.
|
||||
*/
|
||||
final class ThumbnailHelper {
|
||||
public final class ThumbnailHelper {
|
||||
private static final String LOGTAG = "GeckoThumbnailHelper";
|
||||
|
||||
public static final float THUMBNAIL_ASPECT_RATIO = 0.714f; // this is a 5:7 ratio (as per UX decision)
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
|
||||
<include layout="@layout/shared_ui_components"/>
|
||||
|
||||
<org.mozilla.gecko.AboutHomeContent android:id="@+id/abouthome_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_normal"/>
|
||||
<Gecko.AboutHomeContent android:id="@+id/abouthome_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_normal"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -3,8 +3,21 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.widget;
|
||||
|
||||
import org.mozilla.gecko.AwesomeBar;
|
||||
import org.mozilla.gecko.BrowserApp;
|
||||
import org.mozilla.gecko.Favicons;
|
||||
import org.mozilla.gecko.GeckoApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoLinearLayout;
|
||||
import org.mozilla.gecko.LightweightTheme;
|
||||
import org.mozilla.gecko.LightweightThemeDrawable;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.SessionParser;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.TabsAccessor;
|
||||
import org.mozilla.gecko.ThumbnailHelper;
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.db.BrowserContract.Thumbnails;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
|
@ -84,7 +97,7 @@ public class AboutHomeContent extends ScrollView
|
|||
REMOVE_HISTORY
|
||||
}
|
||||
|
||||
static enum UpdateFlags {
|
||||
public static enum UpdateFlags {
|
||||
TOP_SITES,
|
||||
PREVIOUS_TABS,
|
||||
RECOMMENDED_ADDONS,
|
||||
|
@ -265,7 +278,7 @@ public class AboutHomeContent extends ScrollView
|
|||
}
|
||||
}
|
||||
|
||||
void setLastTabsVisibility(boolean visible) {
|
||||
public void setLastTabsVisibility(boolean visible) {
|
||||
if (visible)
|
||||
mLastTabs.show();
|
||||
else
|
||||
|
@ -445,7 +458,7 @@ public class AboutHomeContent extends ScrollView
|
|||
}).execute();
|
||||
}
|
||||
|
||||
void update(final EnumSet<UpdateFlags> flags) {
|
||||
public void update(final EnumSet<UpdateFlags> flags) {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
|
@ -2,8 +2,10 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.widget;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
import org.mozilla.gecko.sync.setup.activities.SetupSyncActivity;
|
||||
import org.mozilla.gecko.sync.setup.SyncAccounts;
|
|
@ -2,8 +2,10 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.widget;
|
||||
|
||||
import org.mozilla.gecko.GeckoLinearLayout;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.util.GamepadUtils;
|
||||
|
||||
import android.content.Context;
|
|
@ -2,7 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.widget;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
Загрузка…
Ссылка в новой задаче