在Android中如何从我们的服务名称中删除本地化详细信息(英语(美国))

时间:2017-01-18 07:04:28

标签: android

我开发了一款软键盘应用程序。哪个工作正常。但安装完成后,当用户打开键盘列表进行选择时,服务名称显示为英语(美国)#BenificaMoji,而服务名称应仅显示为#BenficaMoji。所以我如何从我们的服务名称中删除英语(美国)。并显示服务名称,如#PepsiMoji,显示在下面的图像链接。 Click here for image to understand problem exactly

这是我的AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.crafts">

 <uses-permission     
    android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission  
    android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission 
    android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission      
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission
    android:name="android.permission.PACKAGE_USAGE_STATS"
    tools:ignore="ProtectedPermissions" />

<application
    android:allowBackup="true"
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".SplashActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category  
             android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

    <service
        android:name=".keybord.SoftKeyboard"
        android:description="@string/app_name"
        android:label="@string/app_name"
        android:permission="android.permission.BIND_INPUT_METHOD">
        <intent-filter>
            <action android:name="android.view.InputMethod"
                android:label="@string/app_name"/>
        </intent-filter>

        <meta-data
            android:name="android.view.im"
            android:resource="@xml/method" />
    </service>

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.crafts.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/filepaths" />
    </provider>

    <activity
        android:name=".HomeActivity"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme" />
 </application>

String.xml是---

<resources>
   <string name="app_name">#BenficaMoji</string>

   <string name="ime_name">Easy Moji Keyboard</string>

   <!-- Symbols that are commonly considered word separators in this    
         language -->
   <string name="word_separators">\u0020.,;:!?\n()             
                     []*&amp;@{}/&lt;&gt;_+=|&quot;</string>

   <!-- Labels on soft keys -->
   <string name="label_go_key">Go</string>
   <string name="label_next_key">Next</string>
   <string name="label_send_key">Send</string>
   <string name="label_done_key">Done</string>
   <string name="label_enter_key">Enter</string>
   <string name="label_search_key">Enter</string>
   </resources>

1 个答案:

答案 0 :(得分:1)

我解决了这个问题。要删除本地化,我们必须删除子类型....&gt;在我们的method.xml中标记,其中我指定了android:imeSubtypeLocale =&#34; en_US&#34;。