This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class MessageAction: Java.Lang.Object, ActionMode.ICallback | |
{ | |
string _title; | |
string _subTitle; | |
public event EventHandler<EventArgs> DeleteActionHandler; | |
public event EventHandler<EventArgs> ViewActionHandler; | |
public event EventHandler<EventArgs> DestroyActionHandler; | |
public MessageAction (string title, string subTitle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.ItemLongClick += delegate(object sender, AdapterView.ItemLongClickEventArgs e) { | |
//action context menu already displayed | |
if (_actionMode != null) | |
return; | |
var callback = new MessageAction(Activity.GetString(Resource.String.message_action_title), | |
Activity.GetString(Resource.String.message_action_subtitle)); | |
callback.DeleteActionHandler += delegate { | |
DeleteMessage (_sortedItems[e.Position]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[BroadcastReceiver] | |
public class PrattleSmsReceiver : BroadcastReceiver | |
{ | |
Repository<SmsMessage> _messageRepo; | |
public override void OnReceive (Context context, Intent intent) | |
{ | |
var message = new SmsMessage { | |
Text = intent.GetStringExtra ("messageText"), | |
SmsGroupId = intent.GetIntExtra ("smsGroupId", -1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var viewContainer = new RelativeLayout(this); | |
var layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FillParent, RelativeLayout.LayoutParams.FillParent); | |
AddContentView (viewContainer, layoutParams); | |
var btn = new Button(this) { Text = "Centered" }; | |
var btnParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WrapContent, RelativeLayout.LayoutParams.WrapContent); | |
btnParams.AddRule (LayoutRules.CenterInParent); | |
viewContainer.AddView (btn, btnParams); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editText = FindViewById<EditText>(Resource.Id.search); | |
editText.EditorAction += (object sender, TextView.EditorActionEventArgs e) => { | |
if (e.ActionId == ImeAction.Search) { | |
//do something here when search action button pressed | |
} | |
return; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = new AlertDialog.Builder(this); | |
builder.SetTitle ("Test"); | |
builder.SetIcon (Resource.Drawable.Icon); | |
builder.SetMessage ("Click a button"); | |
builder.SetPositiveButton ("Yes", (sender, e) => { | |
Toast.MakeText (this, "You clicked positive button", ToastLength.Short).Show (); | |
}); | |
builder.SetNegativeButton ("No", (sender, e) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spinMeUp = FindViewById<Spinner>(Resource.Id.spinMeUp); | |
var items = new string[] {"Up", "Down", "Left", "Right", "B", "A", "Select", "Start" }; | |
var adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleSpinnerItem, items); | |
spinMeUp.Adapter = adapter; | |
spinMeUp.Focusable = true; | |
spinMeUp.FocusableInTouchMode = true; | |
spinMeUp.RequestFocus (FocusSearchDirection.Up); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Castle.Core.Logging; | |
using System; | |
namespace Demo.Domain | |
{ | |
public class Bank : LookupItem | |
{ | |
public virtual string DivisionCode { get; set; } | |
public virtual string AccountType { get; set; } | |
public virtual string AccountNumber { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -f gif -i infile.gif outfile.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -f concat -i join.txt -c copy output.mp4 |
OlderNewer