app/src/main/java/com/example/manuelrixen/abbtestapp/Tabs/Article.java
//TODO: Make it possible that the size of MAX_ARTICLE_COUNTER is variable (the size comes from abb controller
Make it possible that the size of MAX_ARTICLE_COUNTER is variable (the size comes from abb controller
Make it possible that the size of MAX_ARTICLE_COUNTER is variable ( the size comes from abb controller
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_section_article);
        int[] articleViewIds = new int[]{R.id.article1, R.id.article2, R.id.article3, R.id.article4, R.id.article5};
        int[] counterViewIds = new int[]{R.id.counter1, R.id.counter2, R.id.counter3, R.id.counter4, R.id.counter5};
        int[] tableRowIds = new int[]{R.id.tableRow4, R.id.tableRow5, R.id.tableRow6, R.id.tableRow7, R.id.tableRow8};
        for (int i = 0; i <= articleViewIds.length - 1; i++) {
            tableRows[i] = (TableRow) findViewById(tableRowIds[i]);
            articleTextViews[i] = (TextView) tableRows[i].findViewById(articleViewIds[i]);
            counterTextViews[i] = (TextView) tableRows[i].findViewById(counterViewIds[i]);
        }
        Button clearButton = (Button) findViewById(R.id.buttonClear);
        clearButton.setOnClickListener(this);
        cycleTimeViewer_actual = (TextView) findViewById(R.id.tableRow1).findViewById(R.id.cycleTimeTextField_actual);
        cycleTimeViewer_actual.setOnTouchListener(this);
        cycleTimeViewer_mean = (TextView) findViewById(R.id.tableRow2).findViewById(R.id.cycleTimeTextField_mean);
        cycleTimeViewer_mean.setOnTouchListener(this);
        Bundle bundle = getIntent().getExtras();
        baseData = (BaseData) bundle.getSerializable("baseData");
        if (receiver == null) {
            try {
                receiver = baseData.getReceiver();
                receiver.registerListener(this);
            } catch (NullPointerException e) {
            }
        }
    }
@ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . fragment_section_article ) ; int [ ] articleViewIds = new int [ ] { R . id . article1 , R . id . article2 , R . id . article3 , R . id . article4 , R . id . article5 } ; int [ ] counterViewIds = new int [ ] { R . id . counter1 , R . id . counter2 , R . id . counter3 , R . id . counter4 , R . id . counter5 } ; int [ ] tableRowIds = new int [ ] { R . id . tableRow4 , R . id . tableRow5 , R . id . tableRow6 , R . id . tableRow7 , R . id . tableRow8 } ; for ( int i = 0 ; i <= articleViewIds . length - 1 ; i ++ ) { tableRows [ i ] = ( TableRow ) findViewById ( tableRowIds [ i ] ) ; articleTextViews [ i ] = ( TextView ) tableRows [ i ] . findViewById ( articleViewIds [ i ] ) ; counterTextViews [ i ] = ( TextView ) tableRows [ i ] . findViewById ( counterViewIds [ i ] ) ; } Button clearButton = ( Button ) findViewById ( R . id . buttonClear ) ; clearButton . setOnClickListener ( this ) ; cycleTimeViewer_actual = ( TextView ) findViewById ( R . id . tableRow1 ) . findViewById ( R . id . cycleTimeTextField_actual ) ; cycleTimeViewer_actual . setOnTouchListener ( this ) ; cycleTimeViewer_mean = ( TextView ) findViewById ( R . id . tableRow2 ) . findViewById ( R . id . cycleTimeTextField_mean ) ; cycleTimeViewer_mean . setOnTouchListener ( this ) ; Bundle bundle = getIntent ( ) . getExtras ( ) ; baseData = ( BaseData ) bundle . getSerializable ( "baseData" ) ; if ( receiver == null ) { try { receiver = baseData . getReceiver ( ) ; receiver . registerListener ( this ) ; } catch ( NullPointerException e ) { } } }
TODO: Make it possible that the size of MAX_ARTICLE_COUNTER is variable (the size comes from abb controller
TODO : Make it possible that the size of MAX_ARTICLE_COUNTER is variable ( the size comes from abb controller
// Set cycle time text fields //        customGraphDialog = new CustomGraphDialog(this);