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 SingletonActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
//... | |
SingletonManager.getInstance(this); | |
} | |
} | |
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 GoodActivity extends Activity implements LocationListener { | |
private LocationManager mLocManager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_leaks); | |
mLocManager = (LocationManager) getSystemService(LOCATION_SERVICE); |
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 LeaksActivity extends Activity implements LocationListener { | |
private LocationManager mLocManager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_leaks); | |
mLocManager = (LocationManager) getSystemService(LOCATION_SERVICE); |
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 MoviesActivity extends Activity { | |
private TextView mNoOfMoviesThisWeek; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.layout_movies_activity); | |
mNoOfMoviesThisWeek = (TextView) findViewById(R.id.no_of_movies_text_view); |
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
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
// do abc long 5s or so | |
} | |
}, 10000); // run "do abc" after 10s. It same as timer, thread... | |
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 AsyncActivity extends Activity { | |
TextView textView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_async); | |
textView = (TextView) findViewById(R.id.textView); |
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 GoodActivity extends Activity { | |
TextView textView; | |
AsyncTask task; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_async); |
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
import 'package:flutter/material.dart'; | |
import 'package:oyobill/base/BaseState.dart'; | |
import 'package:oyobill/data/network/APIs.dart'; | |
import 'package:oyobill/data/network/api_response/TopupHistoryResponse.dart'; | |
import 'package:oyobill/ui/history/topup_history/topup_history_contract.dart'; | |
import 'package:intl/intl.dart'; | |
class TopupHistory extends StatefulWidget { | |
static const route = "/topup-history"; |
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
import 'package:blockpatter/base/BaseState.dart'; | |
import 'package:blockpatter/ui/forgot_pass/forgotpass_page.dart'; | |
import 'package:blockpatter/ui/home/home_page.dart'; | |
import 'package:blockpatter/ui/login/login_contract.dart'; | |
import 'package:blockpatter/ui/registration/registeration_page.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:blockpatter/values/styles.dart'; | |
class LoginPage extends StatefulWidget { | |
static const route = "/login-page"; |
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
private fun manageCamera() { | |
permissionUtils.checkPermission( | |
getContext(), | |
Manifest.permission.CAMERA, | |
object : PermissionUtils.OnPermissionAskListener { | |
override fun onNeedPermission() { | |
ActivityCompat.requestPermissions( |