xamarin.android

prevent activity restarting when orientation changes

流过昼夜 提交于 2019-12-17 11:52:24
问题 I am new to android development .I have separate screens for portrait and landscape mode.When i change my orientation corresponding screen gets loaded and activity restarts . Now i do not want my activity to restart when i change the orientation but should load its corresponding screen(axml). I have tried [Activity (Label = "MyActivity",ConfigurationChanges=Android.Content.PM.ConfigChanges.Orientation)] the above line stops activity getting restarted but it loads the same screen(axml). Please

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed

守給你的承諾、 提交于 2019-12-17 08:01:02
问题 When trying to deploy my app to the Android device I am getting the following error: Deployment failed because of an internal error: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] I am aware of this question but the app is not installed. It has been removed/partially removed by Visual Studio during the attempt to deploy. In the past I solved this by downloading the app from the google play store and then removing it from settings->Application manager. However, now i am getting the error

MVVMCross changing ViewModel within a MvxBindableListView

眉间皱痕 提交于 2019-12-17 06:54:46
问题 Little problem with my Android application and I don't know how to solve it with MVVM Cross. Here is my Model public class Article { string Label{ get; set; } string Remark { get; set; } } My ViewModel public class ArticleViewModel: MvxViewModel { public List<Article> Articles; .... } My layout.axml ... <LinearLayout android:layout_width="0dip" android:layout_weight="6" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/layoutArticleList"> <EditText android

MVVMCross changing ViewModel within a MvxBindableListView

丶灬走出姿态 提交于 2019-12-17 06:53:17
问题 Little problem with my Android application and I don't know how to solve it with MVVM Cross. Here is my Model public class Article { string Label{ get; set; } string Remark { get; set; } } My ViewModel public class ArticleViewModel: MvxViewModel { public List<Article> Articles; .... } My layout.axml ... <LinearLayout android:layout_width="0dip" android:layout_weight="6" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/layoutArticleList"> <EditText android

How do I use SharedPreferences in Xamarin.Android?

只愿长相守 提交于 2019-12-17 03:08:59
问题 I want to save and retrieve some application settings in my Xamarin.Android project. I know that in Android (java), I use the class SharedPreferences to store this information, but I do not know how to convert that to Xamarin C#. When I type "SharedPreferences" into the Xamarin Studio IDE, there is no auto-completion, so I don't know what to use. An initial search of the interwebs took me to a related question, but only contains Android java: Use Shared Preferences in xamarin So to summarise:

Hamburger Menu Xamarin Forms (MasterDetailPage)

≯℡__Kan透↙ 提交于 2019-12-17 02:28:27
问题 I'm new enough to use Xamarin, in my Xamarin Forms project I created a Master-Detail Page and in the ListView that represents the menu I wanted to put Title and Icon, for icon images I have to insert each icon in all device projects? And I also have a small problem, when I click on a menu item and navigate to the selected Detail page, the hamburger menu disappears MainPageMaster.xaml <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x=

What is the normal memory-ram size?(xamarin)

不问归期 提交于 2019-12-14 04:21:48
问题 I'm using an application with many activities inside. also listview with images and so on. Here is an image from apk. Here is an image First question what kind of memory is this with red circle? Is it Ram? Or heap memory? Second question what is the normal size for each apk.Is it safe bigger than a number of memory? Third question my application if this memory is above 380mb. In some cases it crashes my apk.with error message apk doesnt respond. Is something which i can do for this? Most

I can't find Main.axml in any Android Template, nor can I open other axml files

佐手、 提交于 2019-12-14 04:19:35
问题 Edit: I also forgot to mention that I tried running Visual Studio as administrator with all the templates up and I still got the same results Edit2: I figured out that in another place I found the native cross-platform app that has an Main.axml for android Other -> Blank Cross-Platform Mobile App (Native) -> In Layout: Mainaxml but I can't open it (same problem from before) so I guess I'm missing the Android Designer, any way how to fix that? I can't find anything on google Original: First of

Sign in with Azure AD B2C to Xamarin Android app

随声附和 提交于 2019-12-14 03:58:54
问题 After a week of researching authentication principles that would work with Azure AD B2C using the Xamarin to target the Android platform (not Xamarin.Forms), I'm finally asking for a little advice. I've got an activity with a 'Sign in' button and I would like to log in to Azure on the button's touch event. Ideally I'd want to receive a token after the login steps are completed. Here is the code that I have so far: public class MainActivity : Activity { public TaskCompletionSource<bool>

Android - Playing MP4 in VideoView - no video but audio (Z-Order Doesn't Work)

跟風遠走 提交于 2019-12-14 03:26:41
问题 I'm trying to do a simple test playing an MP4 in a VideoView, but I can only hear audio. I've already tried the Z-order trick as suggested in other posts, but it didn't work. TestLayout.axml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/testLayout" android:clipChildren="false"> <VideoView android:id="@+id/testVideo" android:layout_width