久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='iYXoR'></small><noframes id='iYXoR'>

  • <i id='iYXoR'><tr id='iYXoR'><dt id='iYXoR'><q id='iYXoR'><span id='iYXoR'><b id='iYXoR'><form id='iYXoR'><ins id='iYXoR'></ins><ul id='iYXoR'></ul><sub id='iYXoR'></sub></form><legend id='iYXoR'></legend><bdo id='iYXoR'><pre id='iYXoR'><center id='iYXoR'></center></pre></bdo></b><th id='iYXoR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='iYXoR'><tfoot id='iYXoR'></tfoot><dl id='iYXoR'><fieldset id='iYXoR'></fieldset></dl></div>

      <tfoot id='iYXoR'></tfoot>
          <bdo id='iYXoR'></bdo><ul id='iYXoR'></ul>
      1. <legend id='iYXoR'><style id='iYXoR'><dir id='iYXoR'><q id='iYXoR'></q></dir></style></legend>

        Android 圖像對話框/彈出窗口

        Android Image Dialog/Popup(Android 圖像對話框/彈出窗口)

        <small id='MZWk1'></small><noframes id='MZWk1'>

      2. <tfoot id='MZWk1'></tfoot>
          <bdo id='MZWk1'></bdo><ul id='MZWk1'></ul>
        • <i id='MZWk1'><tr id='MZWk1'><dt id='MZWk1'><q id='MZWk1'><span id='MZWk1'><b id='MZWk1'><form id='MZWk1'><ins id='MZWk1'></ins><ul id='MZWk1'></ul><sub id='MZWk1'></sub></form><legend id='MZWk1'></legend><bdo id='MZWk1'><pre id='MZWk1'><center id='MZWk1'></center></pre></bdo></b><th id='MZWk1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MZWk1'><tfoot id='MZWk1'></tfoot><dl id='MZWk1'><fieldset id='MZWk1'></fieldset></dl></div>

                  <tbody id='MZWk1'></tbody>
              • <legend id='MZWk1'><style id='MZWk1'><dir id='MZWk1'><q id='MZWk1'></q></dir></style></legend>
                  本文介紹了Android 圖像對話框/彈出窗口的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  是否可以在 Android 應用程序中僅顯示一個圖像彈出/出現?它類似于覆蓋 AlertDialog 的普通視圖,因此它只包含一個圖像而沒有其他內容.

                  Is it possible to have just an image popup/come-up in an Android application? It's similar to an overriding the normal view of an AlertDialog so that it contains just an image and nothing else.

                  解決方案: 感謝@blessenm 的幫助,我找到了答案.將活動屏蔽為對話框似乎是理想的方式.以下是我使用的代碼.應用程序可以根據需要調用此對話框樣式的活動,就像啟動新活動一樣

                  ImageDialog.java

                  public class ImageDialog extends Activity {
                  
                      private ImageView mDialog;
                  
                  
                      @Override
                      protected void onCreate(Bundle savedInstanceState) {
                          super.onCreate(savedInstanceState);
                          setContentView(R.layout.your_dialog_layout);
                  
                  
                  
                          mDialog = (ImageView)findViewById(R.id.your_image);
                          mDialog.setClickable(true);
                  
                  
                          //finish the activity (dismiss the image dialog) if the user clicks 
                          //anywhere on the image
                          mDialog.setOnClickListener(new OnClickListener() {
                          @Override
                          public void onClick(View v) {
                              finish();
                          }
                          });
                  
                      }
                  }
                  

                  your_dialog_layout.xml

                  <?xml version="1.0" encoding="UTF-8"?>
                  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
                      android:id="@+id/image_dialog_root" 
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:background="@android:color/transparent"
                      android:gravity = "center">
                  
                      <ImageView
                          android:id="@+id/your_image"  
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:src = "@drawable/your_image_drawable"/>
                  
                  </FrameLayout>
                  

                  為 Activity 設置以下樣式以完成此操作至關重要:

                  styles.xml

                    <style name="myDialogTheme" parent="@android:style/Theme.Dialog">
                      <item name="android:windowNoTitle">true</item>
                      <item name="android:windowFrame">@null</item>
                      <item name="android:background">@android:color/transparent</item>
                      <item name="android:windowBackground">@android:color/transparent</item>
                      <item name="android:windowIsFloating">true</item>
                      <item name="android:backgroundDimEnabled">false</item>
                      <item name="android:windowContentOverlay">@null</item>
                     </style>
                  

                  最后一步是在清單中為 Activity 聲明此樣式,如下所示:

                   <activity android:name=".ImageDialog" android:theme="@style/myDialogTheme" />
                  

                  推薦答案

                  如果你只是想使用一個普通的對話框,像這樣應該可以工作

                  If you just want to use a normal dialog something like this should work

                  Dialog settingsDialog = new Dialog(this);
                  settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
                  settingsDialog.setContentView(getLayoutInflater().inflate(R.layout.image_layout
                          , null));
                  settingsDialog.show();
                  

                  image_layout.xml

                  image_layout.xml

                  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                      android:layout_width="wrap_content" android:layout_height="wrap_content"
                      android:orientation="vertical">
                      <ImageView android:layout_width="wrap_content" 
                          android:layout_height="wrap_content" android:src="YOUR IMAGE"/>
                      <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
                          android:text="OK" android:onClick="dismissListener"/>
                  </LinearLayout>
                  

                  這篇關于Android 圖像對話框/彈出窗口的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                    • <bdo id='lJpKX'></bdo><ul id='lJpKX'></ul>
                          <tfoot id='lJpKX'></tfoot>

                              <tbody id='lJpKX'></tbody>
                          1. <legend id='lJpKX'><style id='lJpKX'><dir id='lJpKX'><q id='lJpKX'></q></dir></style></legend>
                            <i id='lJpKX'><tr id='lJpKX'><dt id='lJpKX'><q id='lJpKX'><span id='lJpKX'><b id='lJpKX'><form id='lJpKX'><ins id='lJpKX'></ins><ul id='lJpKX'></ul><sub id='lJpKX'></sub></form><legend id='lJpKX'></legend><bdo id='lJpKX'><pre id='lJpKX'><center id='lJpKX'></center></pre></bdo></b><th id='lJpKX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lJpKX'><tfoot id='lJpKX'></tfoot><dl id='lJpKX'><fieldset id='lJpKX'></fieldset></dl></div>

                            <small id='lJpKX'></small><noframes id='lJpKX'>

                          2. 主站蜘蛛池模板: 免费国产一区二区 | 精品国产视频 | 国产精品成人在线观看 | 免费成人高清在线视频 | 精品99在线 | 久久久精品视频免费 | 成人性生交a做片 | 一本一道久久a久久精品综合 | 国产成人免费视频网站高清观看视频 | 久久久久久久综合 | 欧美日韩国产一区二区 | 成人免费在线播放视频 | 日韩欧美在线免费观看视频 | 丝袜美腿一区二区三区动态图 | 亚洲免费精品一区 | 中文字幕国产精品 | 亚洲精品二三区 | 奇米超碰 | 国产精品一区二区在线 | 99在线免费观看视频 | 精品久久国产视频 | 中文字幕第九页 | 久久不卡区 | 一级特黄a大片 | 国产精品毛片久久久久久久 | 日韩成人在线播放 | 最新免费视频 | 97久久久 | 亚洲精品乱码久久久久久按摩观 | 在线国产一区二区 | 亚洲人久久 | 精品中文视频 | 免费观看黄a一级视频 | 精品国产1区2区3区 在线国产视频 | 一区二区三区四区在线 | 成人av播放 | 欧美日韩在线精品 | 欧美日韩成人影院 | 国产精品一区二区三区在线 | 亚洲精品久久久一区二区三区 | a爱视频 |