xamarin.android

Wrong Yes/No text using Android Resource String

那年仲夏 提交于 2020-05-15 02:41:04
问题 I am building a dialog in Mono for Android like this: AlertDialog.Builder builder = new AlertDialog.Builder(Context); builder.SetTitle(Context.GetString(Resource.String.MyTitle)); builder.SetMessage(Context.GetString(Resource.String.MyQuestion); //YES, not OK builder.SetPositiveButton(Android.Resource.String.Yes, new EventHandler<DialogClickEventArgs>((dlgSender, dlgEvt) => { doSomething();}); builder.SetNegativeButton(Context.GetString(Android.Resource.String.No), new EventHandler

Visual Studio's AndroidApkSigner does not find key in keystore

跟風遠走 提交于 2020-05-11 10:57:45
问题 I am getting this error when creating an APK within Visual Studio: Failed to load signer "signer #1": C:\...\googleplay.keystore entry "googleplay" does not contain a key I am a longtime ASP.NET developer who is familiar with Visual Studio but this is my first Xamarin project. (I am not using Android Studio.) I am trying to deploy the Android build to Google Play. I have never uploaded an APK to Google Play so I cannot use Visual Studio's automatic deployment; I must perform a manual

Xamarin forms check if keyboard is open or not

自作多情 提交于 2020-05-11 07:33:27
问题 Is there any way to check if keyboard is open or not in Xamarin Forms? Are there any events getting fired when the keyboard opens or closes? If so, where can I find an example of it? 回答1: I don't believe that there's a Xamarin.Forms way of doing it. Anyway, for the different platforms (at least Android and iOS) there is a way to achieve what you want. Android Under android there is InputMethodManager class. You can obtain it from your activity var inputMethodManager = (InputMethodManager)this

Xamarin forms check if keyboard is open or not

元气小坏坏 提交于 2020-05-11 07:33:07
问题 Is there any way to check if keyboard is open or not in Xamarin Forms? Are there any events getting fired when the keyboard opens or closes? If so, where can I find an example of it? 回答1: I don't believe that there's a Xamarin.Forms way of doing it. Anyway, for the different platforms (at least Android and iOS) there is a way to achieve what you want. Android Under android there is InputMethodManager class. You can obtain it from your activity var inputMethodManager = (InputMethodManager)this

Create dashed line in ListView Xamarin Forms

对着背影说爱祢 提交于 2020-05-09 10:27:31
问题 How can I create a dashed line to use as a separator for my list view? Example: 回答1: You could do this in custom renderer of listview. MyListViewRenderer.cs: public class MyListViewRenderer : ListViewRenderer { Context ctx; public MyListViewRenderer(Context context) : base(context) { ctx = context; } protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e) { base.OnElementChanged(e); if (Control != null) { //var listView = Control as Android.Widget.ListView;

Xamarin Forms “Bundle assemblies into native code” and ofbuscation

北战南征 提交于 2020-05-08 04:10:09
问题 I created Android app with Xamarin Forms. For release I use option "Bundle assemblies into native code". My apk have size - 17 Mb, without this option 33 Mb. Do I need to use obfuscation for my libraries or my code is protected? I searched a lot - but I did not find an exact answer. 回答1: Bundle Assemblies into Native Code means: When this option is enabled, assemblies are bundled into a native shared library. This option keeps your code safe; it protects managed assemblies by embedding them

“Rebooting receiver” not working android [Xamarin.Android]

a 夏天 提交于 2020-04-30 12:54:28
问题 I am trying to implement a broadcast receiver that gets the broadcast when the device has been rebooted, but is not working (it is supposed to send me a toast when the device has rebooted) with the following code: Broadcast receiver: [BroadcastReceiver] public class RebootReceiver : BroadcastReceiver { public override void OnReceive(Context context, Intent intent) { if (Intent.ActionBootCompleted.Equals(intent.Action)) { Toast.MakeText( context, "Your app has been rebooted!", ToastLength.Long

Dynamic intervals in SetRepeating() method Android [Xamarin.Forms]

只谈情不闲聊 提交于 2020-04-30 07:01:05
问题 I have been seeking in forums to how to implement dynamic intervals on repeated notifications but I haven't found yet a precise answer or a "common" answer for this type of problem. My problem consist that I want to set dynamic intervals (intervals that change when the past interval has gone to be used) on my AlarmManager.SetRepeating() parameter, but as you should know SetRepeating() interval parameter is constant, so you can't change it later to other beacuse the method has already recieved

UnAuthorized Overlay Error on entering Picture in Picture mode YoutubePlayer View Android?

落爺英雄遲暮 提交于 2020-04-30 06:23:17
问题 I am doing live streaming for the youtube videos. By entering into the picture in picture mode the player pause the video with the Error UNAUTHORIZED_OVERLAY . VideoLayout.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linear_youtube_rootlayout" android:orientation="vertical" android:background="@color/black" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.youtube.player.YouTubePlayerView android:id="

How to give unique id for each button

一世执手 提交于 2020-04-28 21:50:23
问题 I have buttons created by loop and each button it corresponds to a desk, so i have to able when i click a button i have to design spesific row of database how i add buttons: for (int i = 1; i < terasmasasayisi; i++) { var buttonteras = new Button { Text = i.ToString(), HeightRequest = 45, WidthRequest = 45, Margin = 5, BorderRadius = 100, };`` teras.Children.Add(button); } If i can set a relationship between the table number and i(desknumber), I can do this according to the id from my