This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @ObservedObject var myViewModel = MyViewModel() | |
| var body: some View { | |
| ScrollView { | |
| VStack { |
This file contains hidden or 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
| RecyclerView recyclerView = findViewById(R.id.recycler_view); | |
| recyclerView.setLayoutManager(new GridLayoutManager(this, 2)); | |
| final MyAdapter adapter = new MyAdapter(); | |
| adapter.endLessScrolled(recyclerView); | |
| adapter.addItems(getTempItems()); | |
| recyclerView.setAdapter(adapter); | |
| // handled click item in recyclerView |
This file contains hidden or 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
| public class MyAdapter extends AdapterRecyclerView<String> { | |
| @Override | |
| public int getItemLayout(int viewType) { | |
| return R.layout.my_item; | |
| } | |
| // optional method override layout progress custom | |
| @Override | |
| public int onProgressLayout() { |
This file contains hidden or 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
| android { | |
| dataBinding { | |
| enabled = true | |
| } | |
| ... | |
| defaultConfig { | |
| ... | |
| } | |
| buildTypes { | |
| ... |
This file contains hidden or 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
| implementation 'androidx.recyclerview:recyclerview:1.0.0' | |
| implementation 'ir.farshid_roohi:customAdapterRecycleView:1.0.4' |
This file contains hidden or 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
| import Foundation | |
| class PrettyTime { | |
| // example uses : PrettyTime.timesAgo(strDate : "2018-03-10 13:19:13" , numericDates : false) | |
| static func timesAgo(strDate:String, numericDates:Bool) -> String { | |