-1

I'm writing a Android Wear (watch) app to complement the tablet / phone app.

The onCreateView doesn't get called when I debug (or run the app).

Is there a different order of execution or method name instead of onCreateView that needs to be used with Android Wear?

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.activity_wear_ref_scorecard, container, false);
    Intent getMatchID = getIntent();
    String message = getMatchID.getStringExtra(MainActivity.match_id);

    //Disable score buttons
    Button homeFoulsBtnDisabled = (Button) findViewById(R.id.btn_HomeScore);
    Button awayFoulsBtnDisabled = (Button) findViewById(R.id.btn_AwayScore);
    Button homeGoalsBtnDisabled = (Button) findViewById(R.id.btn_HomeFoul);
    Button awayGoalsBtnDisabled = (Button) findViewById(R.id.btn_AwayFoul);
    homeFoulsBtnDisabled.setEnabled(false);
    awayFoulsBtnDisabled.setEnabled(false);
    homeGoalsBtnDisabled.setEnabled(false);

Though my button onClicks work fine;

    final Button awayScoreBtn = (Button) findViewById(R.id.btn_AwayScore);
    awayScoreBtn.setOnClickListener(new View.OnClickListener()
    {
        @Override
        public void onClick(View v)
        {
          ....
Arun J
  • 687
  • 4
  • 14
  • 27
Carl Bruiners
  • 87
  • 3
  • 11

1 Answers1

0

I moved everything into the onCreate and all was good.

Carl Bruiners
  • 87
  • 3
  • 11