1

I'm developing an tablet application using the FLEX 4.6 SDK. The application runs only in landscape mode and not in portrait mode.

I have a TextInput on one of my views that when it's tapped, the IME (input method editor) takes the user to another screen (fullscreen mode) that is placed on top of my View. The problem is that I don't want the user to lose the sight of the application when he is typing letters, because I need him to see the live filtering of a list.

I read a lot and found out that I have to add the android:imeOptions="flagNoExtractUi" sentence in android XML manifest. I have no idea where to put it.

I found the following example using the flagNoExtractUi sentence:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"         
    >

    <EditText
        android:imeOptions="flagNoExtractUi"
        android:id="@+id/etTextInAct"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10" >   
        <requestFocus />
    </EditText>

</LinearLayout>

I tried putting it inside my <activity>, as a sibling of its <intent-filter> but nothing happened.

Next is my xml manifest:

<android>
        <manifestAdditions><![CDATA[
            <manifest android:installLocation="auto">
                    <!--See the Adobe AIR documentation for more information about setting Google Android permissions-->
                    <!--Removing the permission android.permission.INTERNET will have the side effect of preventing you from debugging your application on your device-->
                <uses-permission android:name="android.permission.INTERNET"/>
                <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
                    <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->
                    <!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>-->
                    <!--The DISABLE_KEYGUARD and WAKE_LOCK permissions should be toggled together in order to access AIR's SystemIdleMode APIs-->
                    <!--<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>-->
                    <!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->
                    <!--<uses-permission android:name="android.permission.CAMERA"/>-->
                    <!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->
                    <!--The ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE permissions should be toggled together in order to use AIR's NetworkInfo APIs-->
                    <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>-->
                    <!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>-->
                <application android:enabled="true">
                    <activity android:excludeFromRecents="false">
                        <intent-filter>
                            <action android:name="android.intent.action.MAIN" />
                            <category android:name="android.intent.category.DEFAULT" />
                            <category android:name="android.intent.category.LAUNCHER" />
                            <category android:name="android.intent.category.HOME" />
                        </intent-filter>
                        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:orientation="vertical"         
                            >

                            <EditText
                                android:imeOptions="flagNoExtractUi"
                                android:id="@+id/etTextInAct"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:ems="10" >   
                                <requestFocus />
                            </EditText>

                        </LinearLayout>
                    </activity>
                </application>  
            </manifest>

        ]]></manifestAdditions>
</android>

When I tried that, the Flex 4.6 SDK sent the following error: error 402: Current Android sdk version doesn't support LinearLayout as xml tag. I previously tried it using Flex 4.5.1 SDK but it also didn't work.

I also tried it using just the previous <EditText> tag but it also gave me the 402 error.

I want to add that the versions of the ADB and AAPT of the Flex 4.6 SDK are Android Debug Bridge version 1.0.26 and Android Asset Packaging Tool, v0.2.

On the following documentation link is stated that the android:imeOptions="flagNoExtractUi was included on Andoird since the 1.5 version, so the Flex 4.6 SDK should also be capable of including that tag.

I have no more information to give so the only thing left is to ask for your help. Does someone know how to use the android:imeOptions="flagNoExtractUi" and where should I put it?

ketan
  • 19,129
  • 42
  • 60
  • 98
SebastianT
  • 263
  • 3
  • 14
  • Why do you have a LinearLayout in your Manifest??? It seems the file you post is going to be passed through some extractor tool to generate the AndroidManifest.xml but that still doesn't seem right. The LinearLayout goes in a layout xml, not in your AndroidManifest.xml – Chris Stratton Dec 09 '13 at 20:40
  • Thanks. Didn't know that. This is my first Android app. Could you guide me in the right direction? How should I do it in order to disable de IME's fullscreen mode? – SebastianT Dec 09 '13 at 20:46
  • This is a duplicate of [Disabling the fullscreen editing view for soft keyboard input in landscape?](http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape) where numerous solutions are presented. – Chris Stratton Dec 09 '13 at 20:54
  • I did checked that one out and only guided me to know that I had to use the android:imeOptions="flagNoExtractUi" sentence. It's not a dupplicate, it's more specific, since I'm asking on how to do it on the Flex SDK. The question that you mentioned is related to JAVA. – SebastianT Dec 09 '13 at 21:00
  • So what you are saying is that I should create a layout.xml and Flex will add it automatically to the AndroidManifest.xml? – SebastianT Dec 09 '13 at 21:08
  • No, those answers are not "JAVA" but rather "Android". To active this Android feature, you need to either call a method of the view, or else put that string in the xml layout you are using. And xml layout is NOT the same as the AndroidManifest.xml – Chris Stratton Dec 09 '13 at 21:08
  • No, layouts have **nothing to do** with AndroidManifest.xml they are their own xml files fulfilling an entirely different purpose. – Chris Stratton Dec 09 '13 at 21:08
  • I'm sorry to say that most of the answers do not apply since they involve JAVA events. I tried the one using the "onUpdateExtractingVisibility" events (didn't work), the one that says that I should add the to my activity and the one marked as the right answer. None of them worked for me. At least for me, it's clear that it is an independent question. – SebastianT Dec 09 '13 at 21:12
  • No, they do not all involve JAVA events. At least one of them is pure layout XML. – Chris Stratton Dec 09 '13 at 21:13
  • Ok Chris. Then do you have a practical solution for my answer? Because it seems to me that you are only trying to correct my concept-errors, which I appreciate but I'm also interested into solving my problem. If you say it's so simple that on the other question is already solved, then it shouldn't be so hard for you to tell me what do I have to do to solve the issue. Right? – SebastianT Dec 09 '13 at 21:14
  • If you can't call an Android method of the EditText object, then you will need to get that code in your layout xml. – Chris Stratton Dec 09 '13 at 21:15
  • Of so I should call an Android method of the EditText and then use the ´editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI)´ sentence? – SebastianT Dec 09 '13 at 21:23

1 Answers1

0

I'm struggling with the same issue but it seems that there is simply no fix... :(

You can't include a layout file in AIR's xml descriptor (nor will it be magically picked up by the compiler), and there doesn't seem to have any global NoExtractUI flag either, so there you go.. not much left to try.

One you thing you can do however is upvote for the implementation of this feature at Adobe's bugbase: https://bugbase.adobe.com/index.cfm?event=bug&id=3789398

@Chris Stratton: The OP is talking about the Flex SDK which uses Adobe's AIR (mxmlc) compiler, a cross platform tool which supports (among others) an Android export target. This is obviously incompatible with the regular Android compiler, and of course doesn't support Java, XML, or any other Android specific resources/hooks (save a subset of the app's manifest which may be encapsulated in AIR's own xml descriptor file)

Brinca
  • 51
  • 4