コード例 #1
0
 private void SetupEmptyState()
 {
     emptyState.FindViewById <TextView>(Resource.Id.infoText).Text = "No comments on this idea yet.";
     emptyState.FindViewById <ImageView>(Resource.Id.emptyIcon)
     .SetImageDrawable(AppCompatDrawableManager.Get().GetDrawable(this, Resource.Drawable.no_comments));
     ShowEmptyState();
 }
コード例 #2
0
        /// <summary>
        /// Use when emptystate view is inflated from empty_state_2.xml in the app's layout resources folder
        /// </summary>
        /// <param name="emptyState">The emptyState view</param>
        /// <param name="iconResId">The resource id for the icon to be used in the empty state. It should be a vector drawable</param>
        /// <param name="emptyStateText">The text to set for the empty state</param>
        public static void SetEmptyState(View emptyState, int iconResId, string emptyStateText)
        {
            var iconHolder        = emptyState.FindViewById <ImageView>(Resource.Id.emptyIcon);
            var emptyStateTextLbl = emptyState.FindViewById <TextView>(Resource.Id.infoText);

            iconHolder.SetImageDrawable(AppCompatDrawableManager.Get().GetDrawable(App.CurrentActivity, iconResId));
            emptyStateTextLbl.Text = emptyStateText;
        }
コード例 #3
0
 public static void SetEmptyState(View emptyState, int iconResId, string emptyStateLabelText)
 {
     emptyState.FindViewById <TextView>(Resource.Id.stateText).Text = emptyStateLabelText;
     emptyState.FindViewById <ImageView>(Resource.Id.emptyIcon).SetImageDrawable(AppCompatDrawableManager.Get().GetDrawable(App.CurrentActivity, iconResId));
 }
コード例 #4
0
ファイル: BottomBarItemBase.cs プロジェクト: morhung/demo2018
 public Drawable GetIcon(Context context)
 {
     return(this._iconResource != 0 ? AppCompatDrawableManager.Get().GetDrawable(context, this._iconResource) : this._icon);
 }