Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
weeeeeeee

Melih Aksoy melihaksoy

👻
weeeeeeee
View GitHub Profile
View Test.kt
abstract class TestBaseViewModel : ViewModel() {
abstract suspend fun loadData()
init {
viewModelScope.launch {
loadData()
}
}
}
View RegionExample.java
public class MainActivity extends AppCompatActivity {
//region Fields
private int mCount;
//endregion
//region Lifecycle
@Override
@melihaksoy
melihaksoy / Example BaseActivity.java
Last active Nov 12, 2016
An example BaseActivity, which extends AppCompatActivity, to put fragments with animations & start activities with animations easily during development
View Example BaseActivity.java
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();
You can’t perform that action at this time.