Use the currenncy control to present and enter money amounts and currency information. The currency value control presents the currency with the amount, and a title.
MAFCurrencyView is a complex control, which means that it builds on top of these simple controls: MAFTextView, MAFEditText, MAFSpinnerButton, MAFFilterDialog, MAFSectionHeader, and MAFListView . It extends the capabilities of these native Android simple UI controls and adds styling capabilities to the Currency UI component.
There are one-line and two-line currency views: oneline edit (input) mode, readonly (display) mode, or twoline edit (input) mode, and readonly (display) mode.
private MAFCurrencyView oneLineEditView; private MAFCurrencyView oneLineReadOnlyView; oneLineEditView = new MAFCurrencyView(this, "Currency", true, true, ""); oneLineReadOnlyView = new MAFCurrencyView(this, "Currency", false, true, ""); MAFCurrencyView twoLineEditView = new MAFCurrencyView(this, "Currency", true, false, ""); MAFCurrencyView twoLineReadView = new MAFCurrencyView( this, "Currency", false, false, "");
The MAF skinning engine customizes the MAFCurrencyView. To apply SAP style, set the custom style for background, foreground, shadow, font family, and font size in the XML file. Because this complex control consists of six simple controls, you must set all six TargetTypes.
MAFTextView MAFEditText MAFSpinnerButton MAFFilterDialog MAFSectionHeader MAFListView
<Style TargetType="Label" Key="RedCurrency" BasedOn="DefLabel" platform="android"> … </Style> <Style TargetType="TextBox" Key="RedCurrency" BasedOn="DefTextBox" platform="android"> … </Style> <Style TargetType="ComboBox" Key="RedCurrency" BasedOn="SpinnerDef" platform="android"> … </ Style >
oneLineEditView = new MAFCurrencyView(this, "Currency", true, true, "RedCurrency");