Skip to content

Instantly share code, notes, and snippets.

View burakiren's full-sized avatar

Burak burakiren

View GitHub Profile
@burakiren
burakiren / ExampleViewState
Created November 13, 2020 07:33
MVI - ExampleViewState
data class ExampleViewState(
val isPageLoading: Boolean = false,
val isPullToRefresh: Boolean = false,
val userData: User? = null,
val error: Throwable? = null
) {
...
}
/* Copyright (c) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@burakiren
burakiren / AddToCalendar
Created May 6, 2016 06:41
Adding events to calendar
Calendar cal = Calendar.getInstance();
try {
cal.setTime(new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss").parse("07052016"));
} catch (ParseException e) {
System.out.println("Parse Exception");
}
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.getTimeInMillis());
intent.putExtra("allDay", false);
package com.burakiren.restfulapi;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class gitmodel {
@Expose
private String login;