How do they do it? Dialogs over home screen

前端 未结 4 2087
时光取名叫无心
时光取名叫无心 2020-12-30 09:19

I\'m writing an Android application and I would like to place a dialog or view over the home screen so that a user can enter text without jumping into my full application. I

4条回答
  •  粉色の甜心
    2020-12-30 09:55

    Thanks a lot, I tried with Theme.Dialog

      
        
            
            
        
      
    

    But in my code, there is 2 different floating windows : my layout and the tile. Here is the following code:

    import android.app.Activity;
    import android.os.Bundle;
    import android.content.Intent;
    import android.app.Dialog; 
    
    public class language extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
           // setContentView(R.layout.main);
            Dialog dialog = new Dialog(this); 
            dialog.setContentView(R.layout.main); 
            dialog.setTitle("Raygional"); 
            dialog.show();
    
        }
    }
    

    PS : I know this should be a question rather than an answer

提交回复
热议问题