1 Reply Latest reply on Apr 26, 2012 12:17 PM by simra

    Getting map to reappear after switching views

      Hi All,

      I am trying to get the map to reappear after switching views. The basic setup is the user presses a button that switches to a table layout. Afterwards, if the back button is pressed, the view is switched back to the main layout. But, when this switch occurs the map is blank. Any suggestions on this issue?

      /*Create table code*/
      //Inflate table layout
      View view = LayoutInflater.from(MDHealthMobileActivity.this).inflate( R.layout.table,null);
      //Back button
      backBtn = (Button) findViewById(R.id.backBtn);
               backBtn.setOnClickListener(new OnClickListener () {
                public void onClick(View v) {

        • Re: Getting map to reappear after switching views

          you should create new activity for your tableview because after you change the view to the table layout your map loses the reference to the mainlayout I think. Honestly, I have never seen something like this.
          Better stick to the "normal" way. An activity for your map then start another activity with your tablelayout. Changing the contentview like this seems a little drastic to me.