* Changed Activity Label/Launcher Text

* Build Events to "activate" matching Manifest
This commit is contained in:
PhilippC 2013-02-27 22:11:44 +01:00
parent c6d2e26682
commit 049d4d9030
6 changed files with 35 additions and 14 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/src/keepass2android/bin
/src/KeePassLib2Android/bin
/src/KeePass.userprefs
/src/keepass2android/Properties/AndroidManifest.xml

View File

@ -27,12 +27,13 @@ using keepass2android.view;
namespace keepass2android
{
[Activity (Label = "@string/app_name", MainLauncher = true, Theme="@style/Base")]
[Activity (Label = AppNames.AppName, MainLauncher = true, Theme="@style/Base")]
[IntentFilter (new[]{Intent.ActionView},
Label=AppNames.AppLauncherTitle,
DataScheme="file",
DataMimeType="*/*",
DataHost="*",
DataPathPattern=".*\\.kdbx", //TODO http://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i
DataPathPattern=".*\\.kdbx", //TODO http://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i
//http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension
Categories=new[]{Intent.CategoryDefault, Intent.CategoryBrowsable})]
public class KeePass : LifecycleDebugActivity

View File

@ -0,0 +1,2 @@
echo hallo!
copy Properties\AndroidManifest_net.xml Properties\AndroidManifest.xml

View File

@ -0,0 +1,2 @@
echo hallo!
copy Properties\AndroidManifest_nonet.xml Properties\AndroidManifest.xml

View File

@ -29,26 +29,30 @@ using Android.Widget;
namespace keepass2android
{
public static class AppNameResolver
#if NoNet
public static class AppNames
{
public static string AppName
{
get { return "@string/app_name";}
}
public static string AppNameShort
{
get { return "@string/app_name_short";}
}
public const string AppName = "@string/app_name_nonet";
public const string AppNameShort = "@string/short_app_name_nonet";
public const string AppLauncherTitle = "@string/short_app_name_nonet";
}
#else
public static class AppNames
{
public const string AppName = "@string/app_name";
public const string AppNameShort = "@string/short_app_name";
public const string AppLauncherTitle = "@string/app_name";
}
#endif
///Application class for Keepass2Android: Contains static Database variable to be used by all components.
#if NoNet
[Application(Debuggable=false, Label=AppNameResolver.AppName)]
[Application(Debuggable=false, Label=AppNames.AppName)]
#else
#if RELEASE
[Application(Debuggable=false, Label="@string/app_name")]
[Application(Debuggable=false, Label=AppNames.AppName)]
#else
[Application(Debuggable=true, Label="@string/app_name")]
[Application(Debuggable=true, Label=AppNames.AppName)]
#endif
#endif
public class App : Application {

View File

@ -41,6 +41,11 @@
<DeployExternal>True</DeployExternal>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<AndroidSupportedAbis>armeabi,armeabi-v7a</AndroidSupportedAbis>
<CustomCommands>
<CustomCommands>
<Command type="BeforeBuild" command="UseManifestNet.bat" />
</CustomCommands>
</CustomCommands>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseNoNet|AnyCPU' ">
<DebugType>none</DebugType>
@ -51,6 +56,12 @@
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<DefineConstants>NoNet</DefineConstants>
<DeployExternal>True</DeployExternal>
<CustomCommands>
<CustomCommands>
<Command type="BeforeBuild" command="UseManifestNoNet.bat" workingdir="" />
</CustomCommands>
</CustomCommands>
<AndroidSupportedAbis>armeabi,armeabi-v7a</AndroidSupportedAbis>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />