[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Wearable / src / public / RecyclerView / RecycleAdapter.cs
1 /* Copyright (c) 2020 Samsung Electronics Co., Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  */
16 using System;
17 using System.Collections.Generic;
18 using System.ComponentModel;
19 using Tizen.NUI.Components;
20
21 namespace Tizen.NUI.Wearable
22 {
23     /// <summary>
24     /// [Draft] Defalt adapter for RecyclerView.
25     /// Managing RecycleItem and Data for RecyclerView.
26     /// </summary>
27     /// <since_tizen> 8 </since_tizen>
28     [Obsolete("This has been deprecated in API12")]
29     [EditorBrowsable(EditorBrowsableState.Never)]
30     public class RecycleAdapter
31     {
32         private List<object> mData = new List<object>();
33
34         /// <summary>
35         /// Create recycle item for RecyclerView.
36         /// RecyclerView will make its children using this api.
37         /// </summary>
38         /// <returns>Item for RecyclerView</returns>
39         /// <since_tizen> 8 </since_tizen>
40         [Obsolete("This has been deprecated in API12")]
41         [EditorBrowsable(EditorBrowsableState.Never)]
42         public virtual RecycleItem CreateRecycleItem()
43         {
44             return new RecycleItem();
45         }
46
47         /// <summary>
48         /// Bind data with recycler item.
49         /// This function is called when RecyclerItem is used again with new data.
50         /// Can update content of recycle item with new data at DataIndex of item. 
51         /// </summary>
52         /// <param name="item">Reused RecycleItem which needs data binding.</param>
53         /// <since_tizen> 8 </since_tizen>
54         [Obsolete("This has been deprecated in API12")]
55         [EditorBrowsable(EditorBrowsableState.Never)]
56         public virtual void BindData(RecycleItem item)
57         {
58
59         }
60
61         /// <summary>
62         /// Notify when data of adapter is changed.
63         /// </summary>
64         /// <since_tizen> 8 </since_tizen>
65         [Obsolete("This has been deprecated in API12")]
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public void Notify()
68         {
69             OnDataChanged?.Invoke(this, new EventArgs());
70         }
71
72         /// <summary>
73         /// Triggered when user called Notify().
74         /// </summary>
75         /// <since_tizen> 8 </since_tizen>
76         [Obsolete("This has been deprecated in API12")]
77         [EditorBrowsable(EditorBrowsableState.Never)]
78         public event EventHandler<EventArgs> OnDataChanged;
79
80         /// <summary>
81         /// Triggered when user called Notify().
82         /// </summary>
83         /// <since_tizen> 8 </since_tizen>
84         [Obsolete("This has been deprecated in API12")]
85         [EditorBrowsable(EditorBrowsableState.Never)]
86         public List<object> Data
87         {
88             get
89             {
90                 return mData;
91             }
92             set
93             {
94                 mData = value;
95                 Notify();
96             }
97         }
98     }
99 }