Skip to content

Instantly share code, notes, and snippets.

View Fideas's full-sized avatar

Nicolás Carrasco-Stevenson Fideas

  • Mentra by SATS
  • Oslo, Norway
View GitHub Profile
@Fideas
Fideas / OldReportAdapter.kt
Created July 10, 2017 20:04
A simple Adapter to display set of objects. Done with Kotlin + <3
class OldReportAdapter(clickListener: (ChooseReportTypePresenter.ReportTypeEnum) -> Unit) : ReportAdapter(clickListener) {
override val reports: List<ChooseReportTypePresenter.ReportTypeEnum>
get() = listOf(
ChooseReportTypePresenter.ReportTypeEnum.THEFT,
ChooseReportTypePresenter.ReportTypeEnum.VEHICLE_THEFT,
ChooseReportTypePresenter.ReportTypeEnum.BURGLARY,
ChooseReportTypePresenter.ReportTypeEnum.DRUGS,
ChooseReportTypePresenter.ReportTypeEnum.SUSPICIOUS_ACTIVITY,
ChooseReportTypePresenter.ReportTypeEnum.OTHER,
ChooseReportTypePresenter.ReportTypeEnum.ACCIDENT,
@Fideas
Fideas / MyActivity.java
Last active October 7, 2016 17:21
A simple example of how to display a Toast on a button press
public class MyActivity extends AppCompatActivity{
public void myOnClickListener(View v) {
showToast()
}
private void showToast() {
// We get the String resource from strings.xml
String message = getString(R.string.my_string_resource);
//We pass the string as a parameter to our toast builder and finally show the toast to the user
@Fideas
Fideas / TODO List.markdown
Last active August 29, 2015 14:24
waybVB

TODO List

This is another exercise taken from a JavaScript course from the guys @Treehouse. The code here is vanilla JavaScript and is intended to showcase some DOM manipulation and traversing without JQuery. After completing this small project I am grateful that JQuery exists.

A Pen by Nicolás Carrasco-Stevenson on CodePen.

License.