xamarin.android

What to put as launcher:ClassName for launcher favorite

感情迁移 提交于 2019-12-20 07:32:03
问题 My client wants to put the app I developed to be in their launcher favorite and they are asking for the package name and class name of the launcher. Package name is quite straightforward, but ClassName isn't since if I look into the manifest the class name is preceeded by a hash like this: md599e473470f20dc18f556aff51bcfbcb1.LaunchScreen So what is the class name I have to use for launcher favorite, the whole thing or only the class name LaunchScreen? Thanks 回答1: (Congrats on getting into

Clickable Views in Custom ExpandableListView

浪尽此生 提交于 2019-12-20 07:31:07
问题 transferAvailPowered.axml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:focusable="false" android:layout_margin="5dp" android:padding="5dp" android:gravity="left"> <TextView android:id="@+id/availSerial" android:layout_width="0dp" android:layout_weight=".30" android:layout_height="wrap_content" android:layout

Xamarin Support Package error

自闭症网瘾萝莉.ら 提交于 2019-12-20 07:28:32
问题 Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Android resource directory C:\Users\Srinivasarao\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\./ doesn't exist. Sample.Droid Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Java library file C:\Users\Srinivasarao\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\classes.jar doesn't exist. Sample.Droid Please install package: 'Xamarin.Android

How to add a ContentView to a Click Event?

混江龙づ霸主 提交于 2019-12-20 06:21:53
问题 My assignment is to create a program that displays two buttons and my name and current time/date on the main screen. The goal is to have a passage appear once one of the buttons are pressed that will make use of the entire screen. So far, I have created the main page with the labels and buttons. However, I am very lost as to how to display the passage with respect to the button clicked. I am using the empirically fitting text way to make the best use of the screen. I have created a FontCalc

How to Capture multiple photos with Camera xamarin Forms android

為{幸葍}努か 提交于 2019-12-20 06:13:25
问题 I am developing Xamrin form application. Inside it, I am trying to capture multiple photos using a camera with the same intent. without using any nuget package? for this, I am following this link Camera MainActivity.cs static readonly File file = new File(Environment.GetExternalStoragePublicDirectory( Environment.DirectoryPictures), "tmp.jpg"); At the end of OnCreate (Xamarin.Forms.Application.Current as App).ShouldTakePicture += () => { var intent = new Intent(MediaStore.ActionImageCapture);

Async Download and Deserialize

喜夏-厌秋 提交于 2019-12-20 06:13:09
问题 Good evening, I am trying to refine some code using async programming and would like to know if the following code is well written or not, and if is there any way to improve it. Its purpose is to download some JSON from a given URL and deserialize it to an object. I have three (now four) questions ( and 1 issue described at the end of the post ): Should I use TaskEx.Run to run Newtonsoft.Json.JsonConvert.DeserializeObject<T> ? Is there any good way (without checking the object properties) to

Styling a view with a custom style reference

对着背影说爱祢 提交于 2019-12-20 05:39:07
问题 I'm trying to style a RelativeLayout with a custom attribute appNS:style1="@style/RelativeLayout2" The value of this attribute is read during construction with the static method GetStyle(context, attributeSet) and passed to the appropriate base constructor public RelativeLayout2(Context context, IAttributeSet attributeSet) : base(context, attributeSet, 0, GetStyle(context, attributeSet)) { } None of the styling in @style/RelativeLayout2 takes effect, and may be related to a separate issue

Xamarin.Android : Gravity parameter in DrawerLayout.LayoutParams

a 夏天 提交于 2019-12-20 05:20:22
问题 I'm trying to create a DrawerLayout programmatically using Xamarin.Android , but I faced a problem when trying to add the ListView which should be dragable form the left .. Here is my code : DrawerLayout myDrawerLayout = new DrawerLayout(this); myDrawerLayout.LayoutParameters = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent); SetContentView(myDrawerLayout); FrameLayout myFrameLayout = new FrameLayout(this); myFrameLayout.LayoutParameters =

Head request with HttpClient

这一生的挚爱 提交于 2019-12-20 05:15:07
问题 I'm trying to make a HEAD request to Google.com. This is my code: using (var client = new HttpClient()) { var m = new HttpRequestMessage(HttpMethod.Head, "http://google.com"); var resp = await client.SendAsync(m); return true; } When I execute this code I get the following exception: System.Net.WebException: The request requires buffering data to succeed. at System.Net.HttpWebRequest.Redirect (System.Net.WebAsyncResult result, HttpStatusCode code, System.Net.WebResponse response) [0x00000] in

Xamarin set password to SQLite database

試著忘記壹切 提交于 2019-12-20 05:13:46
问题 The conn.setPassword and conn.open have error, can SQLite.NET set the password to the sqlite database? private void Btnsign_Click(object sender, EventArgs e) { try { SQLiteConnection conn = new SQLiteConnection("Data Source=user.db3;Version=3;"); conn.SetPassword("password"); conn.open(); var data = conn.Table<login>(); var data1 = data.Where(x => x.username == txtusername.Text && x.password == txtPassword.Text).FirstOrDefault(); if (data1 != null) { Toast.MakeText(this, "Login Success",