それで、生成されたログイン画面(Eclipseから直接作成できるもの)を備えたAndroidアプリを手に入れました。それは働いています。問題は次のとおりです。ログイン画面をランチャー アクティビティに設定しました。これは機能します。残念ながら、App はログイン アクティビティの label パラメータとして呼び出されます。つまり、アプリケーションの android:label 値は単純に無視されます。
私の質問は非常に曖昧に聞こえるので、これが私のコードです:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" <!-- the app name i want it to have -->
android:theme="@style/AppTheme" >
<activity
android:name="com.test.testytest.MainActivity"
android:configChanges="orientation"
android:label="@string/app_name" >
</activity>
<!-- some more activities -->
<activity
android:name="com.test.testytest.LoginActivity"
android:label="@string/title_activity_login" <!-- the name the app is called in the drawer etc. -->
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
文字列.xml:
<string name="app_name">Testy Test!</string>
string_activity_login:
<string name="title_activity_login">Sign in</string>
Login アクティビティの文字列を app_name に変更すると、アプリの名前も変更されます。しかし、アプリは android:label で定義されているように呼び出す必要があると確信しています
あなたが私を助けてくれるか、私の間違いを指摘してくれることを願っています(多分私は少し詳細が欠けているだけです)。
少し編集:ログインアクティビティのラベルは「ログイン」のままにする必要があるため、変更したくありません。また、最初に呼び出されるアクティビティのままにする必要があります。ただし、ドロワーのアプリ名は で定義されたものである必要があります。