This file contains 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
abstract class TestBaseViewModel : ViewModel() { | |
abstract suspend fun loadData() | |
init { | |
viewModelScope.launch { | |
loadData() | |
} | |
} | |
} |
This file contains 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 MainActivity extends AppCompatActivity { | |
//region Fields | |
private int mCount; | |
//endregion | |
//region Lifecycle | |
@Override |
This file contains 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 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(); |