當前位置: 首頁>>代碼示例>>C#>>正文


C# Android.Equals方法代碼示例

本文整理匯總了C#中Android.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# Android.Equals方法的具體用法?C# Android.Equals怎麽用?C# Android.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Android的用法示例。


在下文中一共展示了Android.Equals方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Delete

        //@Override
        public override int Delete(Android.Net.Uri uri, String selection, String[] selectionArgs)
        {
            // Log.v(TAG, "Delete(uri=" + uri + ", selection=" + selection + ", Args=" + selectionArgs);
            if (uri.Equals(BowlingContract.BCScorecard.CONTENT_URI))
            {
                deleteDatabase();
                return 0;
            }

            SQLiteDatabase db = mDBHelper.WritableDatabase;
            int match = sUriMatcher.Match(uri);
            //
            String selectionCriteria = selection;
            switch (match)
            {
                case SCORECARD_ID:
                    String id = BowlingContract.BCScorecard.getScorecardId(uri);
                    // not used but sample.
                    selectionCriteria = BowlingContract.BaseColumns._ID + "=" + id;
                    //                       + (!TextUtils.isEmpty(selection) ? " AND (" + selection + ")" : "");
                    return db.Delete(BowlingDatabase.Table_SCORECARD, selectionCriteria, selectionArgs);
                default:
                    throw new Exception("Unknown uri: " + uri);
            }
        }
開發者ID:wspeerbrecker,項目名稱:XamarinScorecard,代碼行數:26,代碼來源:BowlingProvider.cs

示例2: Render

		private void Render (Android.Gms.Maps.Model.Marker marker, View view) 
		{
			int id_Imagen=0;

			foreach (Ciudad_Marca ciudad in Ciudades) 
			{
				if (marker.Equals (ciudad.Marcador)) 
				{
					id_Imagen = parent.Resources.GetIdentifier (ciudad.Imagen, "drawable", parent.PackageName);

				}
			}

			((ImageView) view.FindViewById (Resource.Id.badge)).SetImageResource (id_Imagen);

			System.String titulo = marker.Title;
			TextView txtTitulo = ((TextView) view.FindViewById (Resource.Id.title));

			if (titulo != null) {

				txtTitulo.Text = titulo;
			} else {
				txtTitulo.Text = ("");
			}

			System.String descripcion = marker.Snippet;

			TextView txtDescripcion = ((TextView) view.FindViewById(Resource.Id.snippet));
			if (descripcion != null) {
				txtDescripcion.Text = descripcion;
			} else {
				txtDescripcion.Text = "";
			}



		}
開發者ID:DiLRandI,項目名稱:Xamarin.android,代碼行數:37,代碼來源:CustomInfoWindowAdapter.cs

示例3: OnClick

            public void OnClick(Android.Views.View view)
            {
                if (view.Equals(mapControlDemo.zoomButton))
                {
                    mapControlDemo.PerfomZoom();
                }
                else if (view.Equals(mapControlDemo.rotateButton))
                {
                    mapControlDemo.PerfomRotate();
                }
                else if (view.Equals(mapControlDemo.overlookButton))
                {
                    mapControlDemo.PerfomOverlook();
                }
                else if (view.Equals(mapControlDemo.saveScreenButton))
                {
                    // ��ͼ����SnapshotReadyCallback�б���ͼƬ�� sd ��
                    mapControlDemo.mBaiduMap.Snapshot(new ISnapshotReadyCallbackImpl(this));
                    Toast.MakeText(mapControlDemo, "���ڽ�ȡ��ĻͼƬ...",
                            ToastLength.Short).Show();

                }
                mapControlDemo.UpdateMapState();
            }
開發者ID:Yi-shion,項目名稱:Xamarin,代碼行數:24,代碼來源:MapControlDemo.cs

示例4: OnClick

            public void OnClick(Android.Views.View view)
            {
                if (view.Equals(mapControlDemo.zoomButton))
                {
                    mapControlDemo.PerfomZoom();
                }
                else if (view.Equals(mapControlDemo.rotateButton))
                {
                    mapControlDemo.PerfomRotate();
                }
                else if (view.Equals(mapControlDemo.overlookButton))
                {
                    mapControlDemo.PerfomOverlook();
                }
                else if (view.Equals(mapControlDemo.saveScreenButton))
                {
                    //截圖,在MKMapViewListener中保存圖片
                    bool x = mapControlDemo.mMapView.CurrentMap;
                    Toast.MakeText(mapControlDemo, "正在截取屏幕圖片...", ToastLength.Short).Show();
                }

                mapControlDemo.UpdateMapState();
            }
開發者ID:hnhhzy,項目名稱:BaiduMap_SDK_DEMO_for_Xamarin.Android,代碼行數:23,代碼來源:MapControlDemo.cs


注:本文中的Android.Equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。