Skip to content

Commit

Permalink
Adjust enable/disable button text in onResume
Browse files Browse the repository at this point in the history
  • Loading branch information
uerceg committed May 3, 2016
1 parent c3c8c61 commit 6b5fb4a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class MainActivity extends AppCompatActivity {
private static final String EVENT_TOKEN_CALLBACK = "{YourEventToken}";
private static final String EVENT_TOKEN_PARTNER = "{YourEventToken}";

private Button btnEnableDisableSDK;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -30,7 +32,12 @@ protected void onCreate(Bundle savedInstanceState) {
Adjust.appWillOpenUrl(data);

// Adjust UI according to SDK state.
Button btnEnableDisableSDK = (Button)findViewById(R.id.btnEnableDisableSDK);
btnEnableDisableSDK = (Button)findViewById(R.id.btnEnableDisableSDK);
}

@Override
public void onResume() {
super.onResume();

if (Adjust.isEnabled()) {
btnEnableDisableSDK.setText(R.string.txt_disable_sdk);
Expand Down

0 comments on commit 6b5fb4a

Please sign in to comment.