xamarin.android

Android Applications using MonoDroid

巧了我就是萌 提交于 2019-12-13 04:17:50
问题 I used to develop my applications in Eclipse,but I've found out that I can use monodroid to develop my applications in Visual Studio. Now when I run my application, only the emulator starts up and my application is not installed on my device. What should I do? Is there any setting which I have to change before running the application? I'm really new both in android and MonoDroid! 回答1: A step by step description for developing an application in Visual studio using MonoDroid is Tutorial for

MultiDex: Main Dex Capacity Exceeded with MultiDex Enabled

强颜欢笑 提交于 2019-12-13 04:11:03
问题 I'm using a package I've included into my project that requires MultiDex, I've got 156561 references so I'll need multiple .dex files. However it fails, citing that the main dex file is too large Some suggested using keepRuntimeAnnotatedClasses false, but I'm using Xamarin and its not clear on how to accomplish this without Gradle. Others suggest setting the minimum API > 21, which is already true for my project. I've also manually upgraded Proguard, as MultiDex uses it and got the newest 1.8

RecyclerView with multiple view types and data source

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 04:09:38
问题 I am working with a recyclerView and i succeeded in inflating two views but each view content comes from different json data types. i tried passing the two datatypes in the adapter but they are not properly binded source code public class SimpleStringRecyclerViewAdapter : RecyclerView.Adapter { private Article[] mValues; private List<YouTubeItem> mValues2; Context context; public SimpleStringRecyclerViewAdapter(Context context, Article[] items, List<YouTubeItem> item ) { this.context =

Xamarin ClassNotFoundException

谁说胖子不能爱 提交于 2019-12-13 04:08:57
问题 I am new to Xamarin and wrote a simple App, but its shows the following error Unhandled Exception: Java.Lang.ClassNotFoundException: md5c178831cd46fc53bebc42cf953f78ced.SignupActivity occurred My code for MainActivity : using Android.App; using Android.Widget; using Android.OS; namespace AndroidApp1 { [Activity(Label = "Hello Xamarin", MainLauncher = true)] public class MainActivity : Activity { private Button loginButton; private Button signupButton; protected override void OnCreate(Bundle

AlertDialog - gap between custom view and title/buttons

﹥>﹥吖頭↗ 提交于 2019-12-13 04:00:08
问题 I use a custom view for an AlertDialog. In the emulator, there is some space above and below the customeView. If I set a title and buttons for the AlertDialog, I can see the gap between the title panel/button panel and the customView. How can I remove the gap? My code to open the AlertDialog: btnShowDialog.Click += (object sender, EventArgs e) => { var customView = LayoutInflater.Inflate(Resource.Layout.myDialog, null); var builder = new AlertDialog.Builder(this); builder.SetTitle("Title");

Google maps Xamarin : moving the compass button

六眼飞鱼酱① 提交于 2019-12-13 03:56:44
问题 Can I move compass button to a different location ? On top I have menu and that covers my compass 回答1: You can not pick arbitrary positions for those controls, but you can set the padding to move the controls away from the border to allow for your controls. googleMap.SetPadding(0,30,0,0); This method allows you to define a visible region on the map, to signal to the map that portions of the map around the edges may be obscured, by setting padding on each of the four edges of the map. Map

Xamarin axml, xml Intellisense not working

二次信任 提交于 2019-12-13 03:56:10
问题 I started using Visual Studio 2017 Enterprise Edition with Version 15.7.4. and Xamarin Version 4.10.0 and need to work on Xamarin native android application. But Auto fill suggestions not coming in xml and axml files. Intellisense working for widget names(Like TextView, EditText etc.) In layout axml files. But, for widget properties (Like android:layout_width, android:gravity etc.) it isn't working. Where as in styles.xml, menu.xml suggestions not coming at all. I check with following ways. 1

Open pdf by 3rd party app in xamarin forms error 'Error when opening document'

丶灬走出姿态 提交于 2019-12-13 03:48:50
问题 I am trying to open a pdf in a 3rd party app on the android device, but it's not possible. The applicaiton is built in xamarin forms with a shared project. I have used the solution provided here as a basis: Opening a PDF with Xamarin Forms. //I changed the interface to a byte array because I want to download the pdf public interface IDocumentView { void DocumentView(byte[] bytes,string name, string title); } //In my android project: [assembly: Xamarin.Forms.Dependency(typeof(DocumentView))]

Xamarin.Forms - MONO_GC_PARAMS=bridge-implementation=old - how to tell if it's working on Windows?

亡梦爱人 提交于 2019-12-13 03:48:14
问题 I'm seeing this cryptic exception that's been documented on bugzilla.xamarin.com periodically. Most of the posts suggest you can suppress the error by changing the bridge implementation to the Old version instead of Tarjan by setting an environment variable: MONO_GC_PARAMS=bridge-implementation=old I set the variable, but I don't see anything in my logcat or build output to indicate it's using one bridge or the other, and I'm still getting the exception. Is there a way to tell which

Normal and Dark Mode implementation on both Android and iOS without the flashes using Xamarin.Forms 4.3.0.947036

走远了吗. 提交于 2019-12-13 03:39:36
问题 After some discussion on the Original Post, we needed to open a new question for its answer due to an issue found with iOS . The Problem: After attempting this and troubleshooting the results, the iOS async code doesn't work correctly. While Android works ok, the code below in App() doesn't seem to work correctly for iOS , as I apparently can't have await -ables in the App() which is needed to get the coloring correct when navigating. Theme theme = await DependencyService.Get<IEnvironment>()