xamarin.android

How to make Round corner Entry Control Xamarin.Forms

梦想的初衷 提交于 2019-12-14 03:18:24
问题 I have to use round corner entry in Xamarin.Forms, but I have not get any solution for this. I am trying to get this look and feel: Please help me with this issue. 回答1: I had exact same requirement and decided to create custom control called EntryEx . You can find the source code HERE. Here is the list of functions that this control supports. Setting border color Setting border width Setting corner radius You can also set left and right paddings to inset content of entry from left and right.

Xamarin.Andoid: Merge ImageView with CanvasView

半腔热情 提交于 2019-12-14 03:16:47
问题 I am using the FingerPaintCanvasView from this xamarin sample. I am working with 2 layers . The first layer is an ImageView i want to draw on. The second layer is the PaintCanvasView to draw. <RelativeLayout android:layout_height="match_parent" android:layout_width="match_parent"> <ImageView android:id="@+id/markImageImageView" android:layout_height="wrap_content" android:layout_width="wrap_content"/> <fingerpaint.FingerPaintCanvasView android:id="@+id/canvasMarkMeta" android:layout_width=

Android status bar height in Xamarin.Android?

淺唱寂寞╮ 提交于 2019-12-14 02:56:52
问题 I want to find the height of the red square excluding the blue one. 回答1: To get the height of status bar in your OnCreate method, you can use the following: int statusBarHeight = 0, totalHeight = 0, contentHeight = 0; int resourceId = Resources.GetIdentifier ("status_bar_height", "dimen", "android"); if (resourceId > 0) { statusBarHeight = Resources.GetDimensionPixelSize (resourceId); totalHeight = Resources.DisplayMetrics.HeightPixels; contentHeight = totalHeight - statusBarHeight; } The

Blank screen on Xamarin

非 Y 不嫁゛ 提交于 2019-12-14 01:51:05
问题 I have a Xamarin portable project. The Xaml pages I debug are totally blank and I cannot see any components on the pages on both Android and IOS. How can I fix this? Note: It gets no error messages, the pages are opening and I cannot see anything on them. The problem occured after this error. When I fixed it the pages I debug become opening empty, although they were working before InitializeComponent error. Any help would be greatly appreciated. This is my xaml : <?xml version="1.0" encoding=

Monodroid - EditText input method won't accept numbers

别说谁变了你拦得住时间么 提交于 2019-12-14 01:40:27
问题 I am having some very strange problems with the EditText control in Mono for Android. My solution is targeting 2.3 and I am debugging on a T Mobile VivaCity. Here is my AXML for the EditText <EditText android:inputType="text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/ctl_searchText" /> When I show the View containing the EditText the keyboard automatically appears, this is not a problem. The problem is I can't enter any numbers by tapping the

Service is not waking up device as it should

戏子无情 提交于 2019-12-14 00:38:35
问题 My application do a repeating request each second - asking the server for a new data, and if there is such - it wakes up the device and run the main application. ( this is by the request from the users, and they does not care about the battery usage, it is mandatory to run each second. It is Highly Critical Operation ) ( any changes to the settings which could help is allowed by the user ) I am curently trying to achieve this by using either AlarmManager or System.Threading.Timer ( tried with

Xamarin Android ScrollView doesnt work in ListView

不打扰是莪最后的温柔 提交于 2019-12-13 21:49:37
问题 I have a problem with ListView where I need have scroll view when I have there so much items, but ScrollView which implements ListView doesnt work... I dont know why... Can someone help me? I have on half of screen OxyPlot view and under I have on another half screen my ListView where I need scrolling where are there so much items..... Here is screen how looks my view: Here is my code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res

Xamarin CrossGeofence Transitions

半腔热情 提交于 2019-12-13 21:43:18
问题 I downloaded and installed the CrossGeofence plugin for xamarin here: https://github.com/domaven/xamarin-plugins/tree/master/Geofence Used the sample found here as a guideline: https://github.com/domaven/xamarin-plugins/tree/master/Samples/Geofence And I've been testing it out on my physical phone, the LGE LG-D852 (Android 6.0 - API 23) with usb debugging. My CrossGeofenceListener class has been implemented such as: public class CrossGeofenceListener : IGeofenceListener { //TODO: figure out

Android Weight Not Working

走远了吗. 提交于 2019-12-13 21:37:03
问题 I have a textview and edittext in a linear layout. Neither view shows up at all if done the way I've seen every example of using weight to set width as a percentage of parent that I can find. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/custLabel" android:layout_height="wrap_content" android:layout

Resource.Layout.filename is returning the wrong layout file

做~自己de王妃 提交于 2019-12-13 21:30:38
问题 I have a MonoDroid application project (let's call it mainApp ). This references app.Screen project, which is a MFA library project. Initially, my activities were in the mainApp project. Everything was working fine. I needed to put some Activities (and resource, drawables, etc) in the app.Screen project. I have moved all the resources I need to the app.Screen project. It builds fine and in my activities (which are sitting in app.screens) I can access Resource.Layout.filename and even Layout