xamarin.android

iOS and Android development on Windows

僤鯓⒐⒋嵵緔 提交于 2019-12-30 04:55:05
问题 I'm facing a dilemma: I have a solid ASP.NET development experience in C# and looking to start mobile development. I have done research and know that there are some hacks for getting a development environment for iOS on windows, and recently after Apple lifted ban on 3rd party dev apps, Adobe Flash CS5 can be used to package iOS apps. I do have some prior experience with Flash and AS2. So my question is: should i use Flash CS5 for iOS and MonoDroid for Android or should i just get Mac and

MvvmCross - Calling Web Service from View Model

≯℡__Kan透↙ 提交于 2019-12-30 03:36:04
问题 I'm new to MvvmCross and Android development. I have a need to call to POST data to a JSON web service in my view model. I then need to display the result of the web service back in my UI. The gist of my view model looks like the following: public class MyViewModel : MvxViewModel { public override void Start() { base.Start(); } public event EventHandler<EventArgs> Service_Finished; public void CallService() { string url = GetServiceUrl(); WebRequest serviceRequest = HttpWebRequest.Create(url)

Monodroid Javascript Call-back

怎甘沉沦 提交于 2019-12-30 02:17:30
问题 I'm trying to use monodroid with webkit to create an app. I am having a problem with letting the html page call a javascript method, which would be an interface to a method in my app. There is a tutorial on this at http://developer.android.com/guide/webapps/webview.html for how to do it in java, but the same code does not work on C#. This exchange at call monodroid method from javascript example linked a few threads about using JNI to get around a problem with monodroid and the javascript

Circular ProgressBar Background: Android Xamarin

拈花ヽ惹草 提交于 2019-12-30 01:15:32
问题 I have a circular progress-bar and it works fine.But Background is not appearing, even though i have given shape for "background" in the xml drawable file and also progress starts from the right side of the circle (as shown in the figure). I want it to make it from the top. Here is my code: <ProgressBar android:id="@+id/progressBarToday" style="?android:attr/progressBarStyleHorizontal" android:layout_width="50dip" android:layout_height="50dip" android:layout_centerInParent="true" android

Is it possible to specify package name dynamically during build?

淺唱寂寞╮ 提交于 2019-12-30 00:06:33
问题 I'd like to deploy both Debug and Release builds to my device at the same time. I can do this if I manually change the package name in the manifest before I build, e.g. change <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.package"> to <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.packageDEBUG"> However, I'd like to do this automatically when I'm building the solution. If I do a Debug build, it'll build with package="my

PushAsync is not supported globally on Android, please use a NavigationPage - Xamarin.Forms

泄露秘密 提交于 2019-12-29 10:53:41
问题 I have the following method in an Xamarin.Forms.ContentPage wired to a button click event public class LoginPage : ContentPage { private Button _loginButton = null; private Entry _PasswordInput = null; private Entry _UsernameInput = null; public LoginPage() { _UsernameInput = new Entry { Placeholder = "Username" }; _PasswordInput = new Entry { Placeholder = "Password", IsPassword = true }; _loginButton = new Button { Text = "Login", BorderRadius = 5 } _loginButton.Clicked += LogIn; Content =

PushAsync is not supported globally on Android, please use a NavigationPage - Xamarin.Forms

烂漫一生 提交于 2019-12-29 10:53:11
问题 I have the following method in an Xamarin.Forms.ContentPage wired to a button click event public class LoginPage : ContentPage { private Button _loginButton = null; private Entry _PasswordInput = null; private Entry _UsernameInput = null; public LoginPage() { _UsernameInput = new Entry { Placeholder = "Username" }; _PasswordInput = new Entry { Placeholder = "Password", IsPassword = true }; _loginButton = new Button { Text = "Login", BorderRadius = 5 } _loginButton.Clicked += LogIn; Content =

Moving image with touch events

北城以北 提交于 2019-12-29 08:21:28
问题 I need a sample code for when we move(touch) a image from left to right and right to left. Please help me. Regards, chakri 回答1: try this code... this is your main activity class import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.ImageView; import android.widget.LinearLayout.LayoutParams; import android.widget

How to use CanExecute with Mvvmcross

丶灬走出姿态 提交于 2019-12-29 07:36:25
问题 I have a Button <Button android:id="@+id/ButtonConnect" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Disconnect" local:MvxBind="{'Click':{'Path':'DisconnectCommand'}}" /> And I have a Command for it public IMvxCommand DisconnectCommand { get { return new MvxRelayCommand(this.GetService<IConnectionService>().Disconnect); } } Then I want to enable/disable the DisconnectCommand using DisconnectCommand.CanExecute(this.GetService<IConnectionService>()

How to change searchbar cancel button image in xamarin forms

*爱你&永不变心* 提交于 2019-12-29 07:19:06
问题 I have used custom renderer to change the search bar underline color. But i don't know how to change the cancel button cross symbol(X) to image as shown in the attached screenshot. My custom renderer is as below, public class CustomSearchBarRenderer : SearchBarRenderer { protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e) { base.OnElementChanged(e); if (e.OldElement == null) { LinearLayout linearLayout = this.Control.GetChildAt(0) as LinearLayout; linearLayout =