So i have an animation style defined in Resources/values/styles.xml
<style name="BottomSheetAnimation">
<item name="android:windowEnterAnimation">#anim/dock_bottom_enter</item>
</style>
But it gave me compile error:
No resource found that matches the given name (at 'android:windowEnterAnimation' with value '#anim/dock_bottom_enter').
When i changed it into #+anim/dock_bottom_enter (notice the plus sign), it gave me another error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1698,3): error MSB6006: "aapt.exe" exited with code -1073741819
I have defined the animation in anim folder (Resources/Anim/dock_bottom_enter.xml). I also have defined that file as AndroidResource in the Solution Explorer.
Strangely, i can access the animation from resoure class (Resource.Anim.dock_bottom_enter). Seems like it is actually compiled successfully, but i can't refer animation from style. Is there something i forget to do?
I have tried cleaning, rebuild, changing xml to axml, changing the case (Anim to anim), none of them works. I am using latest Xamarin version (Xamarin Android 6)
Try something like this :
<item name="activityOpenEnterAnimation">#anim/activity_open_enter</item>
Refer : https://github.com/android/platformframeworksbase/blob/master/core/res/res/values/styles.xml
Related
I am writing a setup project for wix v3 in visual studio. The purpose of the project is to install a bunch of files to certain directories and then alter an XML file by setting values for elements. Everything builds fine until I add the XmlFile element to edit the XML file. Here is a code snippet of the element:
<Fragment>
<util:XmlFile
File="[INSTALLDIR]⁄Server/MEScontrol.config"
Id="config"
Action="setValue"
Name="connectionString"
ElementPath="⁄MEScontrol⁄DatabaseServer⁄Package[\[]#name='core'[\]]/add[[]#Assembly[\]]"
Value="[\[]#name='BINGBONG'[\]]" />
</Fragment>
The error I get when building is this:
"The Fragment element contains an unhandled extension element 'util:XmlFile'. Please ensure that the extension for elements in the 'http:⁄⁄schemas.microsoft.com⁄wix⁄UtilExtension' namespace has been provided"
I know that I need to add the namespaces
xmlns="http://schemas.microsoft.com/wix/2006/wi" and
xmlns:util="http://schemas.microsoft.com⁄wix⁄UtilExtension"
to my code and then add the reference WixUtilExtension to the project, which I have done, but I still get this error when building. Is it possible that I miss something in my code or references? I have also tried adding the util:XmlFile element as a Component inside my Directory structure but still the same error
Don't worry everybody I figured it out almost as soon as i posted this question. Apparently the "/" I was using in the namespace was not actually the correct character for a URL and that was causing the error. Silly me
I'm running Visual Studio 2015 Enterprise and I am trying to build a Xamarin project. I created a Blank XAML App project. I went went to MainPage.xaml file and added an x.Name to the boilerplate Label like so:
In the MainPage.xaml.cs file I attempt to change the text of that Label by referencing that name hello:
VS does not seem to like this as I get an error:
The name "hello" does not exist in the current context.
How can I access the names in the XAML file? I've tried cleaning the solution and rebuilding with no success.
You have to use x:Name instead of x.Name. x is the namespace you have declared with xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" and if you want to use something declared in this namespace, you have to use x followed by a colon and than the class or attribute name.
<Label x:Name="hello"
Text="Welcome to Stackoverflow"
VerticalOptions="Center"
HorizontalOptions="Center"/>
As #Sven-Michael Stübe noticed first you need to swap your x.Name declaration (which is incorrect) with x:Name.
Then, right click on your project and click build (or ⌘K shortcut on Mac) to allow the complier see your name declaration. The red underline should disappear afterwards.
I recently migrated to Visual Studio 2013 Update 4 and installed Web Essentials 2013 for Update 4. I downloaded the compass files and tried to do my very first sass (scss) files.
Two issues I could solve already by myself (see "solved" below), still two more to go :-(
OPEN: Detailed error message?
I discovered was that there seem to be two different kind of errors. One kind of error Visual Studio / Web Essential are handled with a wavy underline or telling the reason on the result window on the right, which is totally fine, but I am having trouble with "other kinds of errors", where my CSS simply doesn't get updated and it is not telling me why.
In the Output Window I can see:
SCSS: myfile.scss compilation failed: The service failed to respond to this request
Possible cause: Syntax Error!
But no further details. Is there any kind of log file?
OPEN: #mixing for image-width not working
Calling the method image-width or image-height (as described here: http://compass-style.org/reference/compass/helpers/image-dimensions/ )
always ends up in an "Syntax Error!" error as shown in the open issue above.
The code I'm using is pretty simple (file in the same location and exists):
width: image-width("MyImage.jpg");
SOLVED: Import Issue
I could solve the problem why the following statement wasn't working:
#import "compass";
Instead, I have to specify a specific file and not a folder, like so:
#import "compass/reset/_utilities.scss";
Reason: Regarding to the sass-lang documentation, the decleration is not for folders, it is actually for "Partials" (http://sass-lang.com/guide#topic-4) and underscore sass files are treated as such. In my project I had the compass folder included, but I was missing the _compass.scss file (this is what #import "compass" was looking for).
SOLVED: Calling basic Compass funtionallity
I could solve: Basic Sass-functionality works, but by calling the compass mixin such as global-reset in, the renderd code looks like this
...
elements-of-type(html5-block) { display: block; }
...
Solution: In the Visual Studio Options, Navigate to WebEssentials > SASS > Use Ruby Runtime and set the value to "True"
I'm creating a cast-enabled application using the CastVideos-android sample project as a reference.
Version 1.2 of the CastVideos-android sample uses this forked version of the ShowcaseView library to display a very nice looking overlay to highlight the cast button.
This is great and helps developers satisfy the Cast Sender-App UI requirements, but this forked version of the ShowcaseView library doesn't play well with apps that may use multiple icons in the ActionBar.
For example, when adding a SearchView-type item to the ActionBar the ShowcaseView bugs-out.
The result is below and the steps to replicate this behavior are below the screenshot :
Steps to replicate:
Include the v7-appcompat as a library project in the CastVideo-android project.
Change the res/menu/main.xml in the CastVideo-android project to look like the following (adding an ActionView of type SearchView to the ActionBar) :
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:compat="http://schemas.android.com/apk/lib/res/android.support.v7.appcompat" >
<item
android:id="#+id/media_route_menu_item"
android:title="#string/media_route_menu_title"
app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider"
app:showAsAction="always"/>
<item
android:id="#+id/action_settings"
android:title="#string/action_settings"
app:showAsAction="never"/>
<item
android:id="#+id/search"
android:icon="#drawable/abc_ic_search"
app:title="#string/menu_Search"
app:actionViewClass="android.support.v7.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom"/>
</menu>
I'm using the latest version of the v7-appcompat library.
I suspect the culprit to be how the ActionBarViewWrapper.getMediaRouterButtonView() method (found in com.github.amlcurran.showcaseview.targets) is finding the MediaRouterButton via reflection, but can't seem to understand how to find the MediaRouterButton if there are multiple icons items in the ActionBar.
Any help would be greatly appreciated!
The forked project has been updated to handle this case. Thanks for reporting the issue. Once I hear from you (or anyone else) that it works as expected, I will submit a pull request to Alex.
I am using the Consumer Preview of Windows 8 to create a Metro app. Whenever I add a new IValueConverter to a XAML page I receive the following exceptions from within the StandardStyles.xaml file:
The name "DictionaryEntry" does not exist in the namespace "using:System.Collections"
The errors point to this section of the StandardStyles.xaml file:
<ResourceDictionary.ThemeDictionaries>
<Collections:DictionaryEntry x:Key="Default">
<Collections:DictionaryEntry.Value>
<ResourceDictionary>
<x:String x:Key="BackButtonGlyph"></x:String>
<x:String x:Key="BackButtonSnappedGlyph"></x:String>
</ResourceDictionary>
</Collections:DictionaryEntry.Value>
</Collections:DictionaryEntry>
<Collections:DictionaryEntry x:Key="HighContrast">
<Collections:DictionaryEntry.Value>
<ResourceDictionary>
<x:String x:Key="BackButtonGlyph"></x:String>
<x:String x:Key="BackButtonSnappedGlyph"></x:String>
</ResourceDictionary>
</Collections:DictionaryEntry.Value>
</Collections:DictionaryEntry>
</ResourceDictionary.ThemeDictionaries>
This file was added automatically when I created a new Metro App project from the default Metro App project templates. The file compiled and ran fine before I added a IValueConverter to a page. The issue happens every time I add a IValueConverter, regardless of which project template I use, and regardless of if I add the IValueConverter using Expression Blend or Visual Studio.
This could just be a bug in the Consumer Preview release, but it seems like such a fundamental piece of work, that I figured it was worth asking here if anyone else has run into this issue and, if so, how were you able to solve or workaround it?