Skip to content

Commit

Permalink
[IMP]code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
dso-odoo committed Apr 6, 2015
1 parent 11c20a4 commit 61f65ce
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions app/src/main/java/com/odoo/core/account/About.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@

public class About extends ActionBarActivity implements View.OnClickListener {
public static final String TAG = About.class.getSimpleName();

private final static String DEVELOPER_MODE = "developer_mode";
private TextView versionName = null, aboutLine2 = null, aboutLine3 = null,
aboutLine4 = null;
private Handler handler = null;
private int click_count = 0;
private final static String DEVELOPER_MODE = "developer_mode";
Runnable r = null;


@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -115,14 +116,15 @@ public boolean onOptionsItemSelected(MenuItem item) {
public void onClick(View v) {

handler = getWindow().getDecorView().getHandler();
if (r == null) {
r = new Runnable() {
public void run() {
click_count = 0;
}
};
handler.postDelayed(r, 7000);
}
click_count = click_count + 1;
Runnable r = new Runnable() {
public void run() {
click_count = 0;
}
};
handler.postDelayed(r, 7000);

if (click_count == 3) {
Toast.makeText(this, R.string.developer_2_tap, Toast.LENGTH_SHORT).show();
}
Expand Down

0 comments on commit 61f65ce

Please sign in to comment.