Skip to content

Instantly share code, notes, and snippets.

View melihaksoy's full-sized avatar

Melih Aksoy melihaksoy

View GitHub Profile
View Test.kt
abstract class TestBaseViewModel : ViewModel() {
abstract suspend fun loadData()
init {
viewModelScope.launch {
public class MainActivity extends AppCompatActivity {
//region Fields
private int mCount;
//region Lifecycle
melihaksoy / Example
Last active November 12, 2016 09:33
An example BaseActivity, which extends AppCompatActivity, to put fragments with animations & start activities with animations easily during development
View Example
public class BaseActivity extends AppCompatActivity {
* Puts given fragment to "DT410QeExd9KcRDM7n3OItQDo0jxpaT8uOE4n" id'ed view
* @param fragment {@link Fragment} to put in view
public void putFragment(Fragment fragment) {
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();