Search in sources :

Example 11 with UIHandler

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;
}
Also used : UIHandler(com.cpjd.roblu.ui.UIHandler)

Example 12 with UIHandler

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();
}
Also used : UIHandler(com.cpjd.roblu.ui.UIHandler) Toolbar(android.support.v7.widget.Toolbar)

Example 13 with UIHandler

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();
}
Also used : RBoolean(com.cpjd.roblu.models.metrics.RBoolean) RForm(com.cpjd.roblu.models.RForm) UIHandler(com.cpjd.roblu.ui.UIHandler) IO(com.cpjd.roblu.io.IO) Toolbar(android.support.v7.widget.Toolbar)

Example 14 with UIHandler

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;
}
Also used : UIHandler(com.cpjd.roblu.ui.UIHandler)

Example 15 with UIHandler

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;
}
Also used : UIHandler(com.cpjd.roblu.ui.UIHandler)

Aggregations

UIHandler (com.cpjd.roblu.ui.UIHandler)26 Toolbar (android.support.v7.widget.Toolbar)14 IO (com.cpjd.roblu.io.IO)10 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)5 SimpleItemAnimator (android.support.v7.widget.SimpleItemAnimator)5 ItemTouchHelper (android.support.v7.widget.helper.ItemTouchHelper)4 MenuInflater (android.view.MenuInflater)4 RForm (com.cpjd.roblu.models.RForm)4 ArrayList (java.util.ArrayList)4 RecyclerView (android.support.v7.widget.RecyclerView)3 IntentFilter (android.content.IntentFilter)2 View (android.view.View)2 AdapterView (android.widget.AdapterView)2 ListView (android.widget.ListView)2 SimpleAdapter (android.widget.SimpleAdapter)2 TextView (android.widget.TextView)2 RUI (com.cpjd.roblu.models.RUI)2 MaterialSearchView (com.miguelcatalan.materialsearchview.MaterialSearchView)2 HashMap (java.util.HashMap)2 AlertDialog (android.app.AlertDialog)1