use of com.cpjd.roblu.ui.UIHandler in project Roblu by wdavies973.
the class CSVActivity method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.csv_menu, menu);
new UIHandler(this, menu).updateMenu();
return true;
}
use of com.cpjd.roblu.ui.UIHandler in project Roblu by wdavies973.
the class CSVActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_csv);
event = (REvent) getIntent().getSerializableExtra("event");
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("CSV Exporter");
new UIHandler(this, toolbar).update();
}
use of com.cpjd.roblu.ui.UIHandler in project Roblu by wdavies973.
the class MetricEditor method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_element);
/*
* Load dependencies
*/
rui = new IO(getApplicationContext()).loadSettings().getRui();
if (getIntent().getSerializableExtra("form") != null)
form = (RForm) getIntent().getSerializableExtra("form");
tab = getIntent().getIntExtra("tab", 0);
/*
* Setup UI
*/
// Toolbar
Toolbar toolbar = findViewById(R.id.support_toolbar);
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setHomeAsUpIndicator(R.drawable.clear);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("Add metric");
}
// layout
layout = findViewById(R.id.add_element_layout);
// RMetric to UI
rMetricToUI = new RMetricToUI(this, rui, true);
rMetricToUI.setListener(this);
/*
* Check if the user actually wants to edit
*/
if (getIntent().getSerializableExtra("metric") != null) {
metric = (RMetric) getIntent().getSerializableExtra("metric");
if (getSupportActionBar() != null)
getSupportActionBar().setTitle("Edit metric");
/*
* The modified variable DOES NOT matter in the form, so always, always make sure it's true
* so N.O. tags don't show up
*/
metric.setModified(true);
addMetricPreviewToToolbar();
buildConfigLayout();
} else {
// add a RBoolean type, it's the default loaded type until the user selects a different one
metric = new RBoolean(0, "Boolean", false);
/*
* The modified variable DOES NOT matter in the form, so always, always make sure it's true
* so N.O. tags don't show up
*/
metric.setModified(true);
layout.addView(initMetricSelector());
}
// Sync UI with color preferences
new UIHandler(this, toolbar).update();
}
use of com.cpjd.roblu.ui.UIHandler in project Roblu by wdavies973.
the class FullScreenImageGalleryActivity method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.image_full_screen_actionbar, menu);
new UIHandler(this, menu).updateMenu();
return true;
}
use of com.cpjd.roblu.ui.UIHandler in project Roblu by wdavies973.
the class TeamsView method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.teams_view_actionbar, menu);
new UIHandler(this, menu).updateMenu();
return true;
}
Aggregations