Commit b9305b74 authored by rahadi's avatar rahadi

Added Pemutakhiran Module

parent 94555bd3
...@@ -63,6 +63,11 @@ public abstract class BSImpActivity extends AppCompatActivity implements OnBSAda ...@@ -63,6 +63,11 @@ public abstract class BSImpActivity extends AppCompatActivity implements OnBSAda
setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("Pemutakhiran");
}
blokSensusList = findViewById(R.id.list_blok_sensus); blokSensusList = findViewById(R.id.list_blok_sensus);
loadingView = findViewById(R.id.loading_view); loadingView = findViewById(R.id.loading_view);
listContainer = findViewById(R.id.list_container); listContainer = findViewById(R.id.list_container);
...@@ -108,7 +113,9 @@ public abstract class BSImpActivity extends AppCompatActivity implements OnBSAda ...@@ -108,7 +113,9 @@ public abstract class BSImpActivity extends AppCompatActivity implements OnBSAda
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
int menuId = item.getItemId(); int menuId = item.getItemId();
if (menuId == R.id.sync_menu_item) { if (menuId == android.R.id.home) {
onBackPressed();
} else if (menuId == R.id.sync_menu_item) {
UserModel userModel = Vsen.getInstance().getUserSession(); UserModel userModel = Vsen.getInstance().getUserSession();
new BSSynchronizationTask(loadingView, listContainer).execute(userModel.getIdUser(), userModel.getAuthToken(), new OnSynchronizationCompletedListener<JSONArray>() { new BSSynchronizationTask(loadingView, listContainer).execute(userModel.getIdUser(), userModel.getAuthToken(), new OnSynchronizationCompletedListener<JSONArray>() {
@Override @Override
......
...@@ -81,7 +81,6 @@ public abstract class DsrtMinImpActivity extends AppCompatActivity { ...@@ -81,7 +81,6 @@ public abstract class DsrtMinImpActivity extends AppCompatActivity {
int menuId = item.getItemId(); int menuId = item.getItemId();
if (menuId == android.R.id.home) { if (menuId == android.R.id.home) {
onBackPressed(); onBackPressed();
} else if (menuId == R.id.generate_menu_item) { } else if (menuId == R.id.generate_menu_item) {
onGenerateMenuClicked(bsUuid, bsNks); onGenerateMenuClicked(bsUuid, bsNks);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment