From e1f9b5394b7cf512a0bcbbb4f1ae2a96e9b8b248 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 29 Jan 2015 14:40:29 +0900 Subject: android: Actually we don't need ViewFactory Change-Id: I2d1ccafefe9c52d0536601ba7ff219e6547ceb20 --- .../org/libreoffice/LibreOfficeMainActivity.java | 2 -- .../src/java/org/libreoffice/ViewFactory.java | 36 ---------------------- 2 files changed, 38 deletions(-) delete mode 100644 android/experimental/LOAndroid3/src/java/org/libreoffice/ViewFactory.java (limited to 'android') diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index 362fb786623e..f1eb759cb24e 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -96,8 +96,6 @@ public class LibreOfficeMainActivity extends LOAbout { mMainHandler = new Handler(); - LayoutInflater.from(this).setFactory(ViewFactory.getInstance()); - if (getIntent().getData() != null) { mInputFile = getIntent().getData().getPath(); } else { diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ViewFactory.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ViewFactory.java deleted file mode 100644 index 68f88d990103..000000000000 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ViewFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.libreoffice; - -import android.content.Context; -import android.util.AttributeSet; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; - -import org.mozilla.gecko.TextSelectionHandle; -import org.mozilla.gecko.gfx.LayerView; - -public class ViewFactory implements LayoutInflater.Factory { - private static final String LOGTAG = ViewFactory.class.getSimpleName(); - private static final String LAYER_VIEW_ID = "org.mozilla.gecko.gfx.LayerView"; - private static final String TEXT_SELECTION_HANDLE_ID = "org.mozilla.gecko.TextSelectionHandle"; - private static final ViewFactory INSTANCE = new ViewFactory(); - - private ViewFactory() { - } - - public static LayoutInflater.Factory getInstance() { - return INSTANCE; - } - - @Override - public View onCreateView(String name, Context context, AttributeSet attrs) { - if (name.equals(LAYER_VIEW_ID)) { - Log.i(LOGTAG, "Creating custom Gecko view: " + name); - return new LayerView(context, attrs); - } else if (name.equals(TEXT_SELECTION_HANDLE_ID)) { - Log.i(LOGTAG, "Creating custom Gecko view: " + name); - return new TextSelectionHandle(context, attrs); - } - return null; - } -} \ No newline at end of file -- cgit