當前位置:首頁 » 背景圖片 » 安卓背景圖片
擴展閱讀
如何把圖片疊加軟體 2024-09-20 21:03:29
動漫人物里的女人圖片 2024-09-20 21:02:41
平板電腦如何掃描圖片 2024-09-20 20:30:10

安卓背景圖片

發布時間: 2022-01-09 21:34:04

A. 安卓高清背景圖片

是這個吧,正好我手機里有.......

B. Android設置背景圖片和背景色

你應該是寫android的 你應該知道layout的存在吧,你可以設置兩個layout一個是全背景,然後用setbackgroundclolr(blue)方法設定背景顏色,然後在其內部設置一個小的layout這個layout你自己設定大小,然後用setbackgroundresouce(xxx)把你的圖片放到上面就可以了,簡單的說就多了一個layout而已,希望能幫到你。

C. android怎麼設置自適應大小的背景圖片

需要給你的ImageView布局加上Android:adjustViewBounds="true"

<ImageView android:id="@+id/test_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/ic_launcher" />

然後,在代碼里設置ImageView.最大寬度和最大高度,因為adjustViewBounds屬性只有在設置了最大高度和最大寬度後才會起作用

int screenWidth = getScreenWidth(this);
ViewGroup.LayoutParams lp = testImage.getLayoutParams();
lp.width = screenWidth;
lp.height = LayoutParams.WRAP_CONTENT;
testImage.setLayoutParams(lp);

testImage.setMaxWidth(screenWidth);
testImage.setMaxHeight(screenWidth * 5); 這里其實可以根據需求而定,我這里測試為最大寬度的5倍

D. 安卓手機背景圖片顯示不全,怎麼辦

修改圖片尺寸後可以完整顯示。

  1. 網路搜索對應手機壁紙的尺寸。

  2. 在Photoshop中新建一個空白的文檔,尺寸為搜索到的尺寸。

  3. 導入需要作為手機壁紙的圖片,進行拉伸處理。

  4. 提醒:如果圖片縮小後寬度不夠尺寸要求,可以讓需要顯示的圖片在Photoshop里居中,兩側用同一張圖片覆蓋。

  5. 保存後導入手機,在壁紙設置中選擇居中,這樣就不會被拉伸變形,也能完整顯示了。

E. Android app中如何設置背景圖片

是因為你把這個圖片放在了drawable-land文件夾下,你放到drawable-hdpi下試試看。

F. 安卓--如何用圖片鋪滿屏幕(即做成背景)

意義不明
如果只是全屏鋪滿,你弄一個ImageView
設置ScaleType為fitCenter就可以了
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/a5game_fruit_holiday_yd"
android:scaleType="fitCenter"/>

G. android 怎麼再背景圖片上添加圖片

你是指的用代碼寫嗎?用XML還是直接代碼,直接代碼的話
你先創建一個比如說,
Linernlayout la=new LinernLayout(context);
然後你給這個主布局設置一個圖片,例如
la.setBackgounrdforResource(R.darwable.pic1);
然後你再寫另一個布局
Linernlayout la2=new LinernLayout(context);
這個子布局設置一個大小,例如
la2.setLayoutParmgs(new Layoutparmgs(400,400));
給子布局設置圖片
la2.setBackgounrdforResource(R.darwable.pic2);
然後你將子布局添加進主布局中
la.addView(la2);
然後設置顯示主布局就OK,就可以看到底下一個圖片。上面還有個圖片
setContentView(la);

H. 安卓手機壁紙在哪個文件夾

你們好像都答非所問。
他問的是用一張相片做壁紙,現在相片刪除了,壁紙還在,想在手機的系統文件里找出這張壁紙圖片。就好像xp設置壁紙後該圖片會被復制到c:\windows\web\wallpaper這里。但是安卓的就不知道放在哪裡,我自己找過也沒找到。

I. 在android編程中怎麼插入背景圖片啊

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/qq"
>
上面的代碼是把drawable下的名字為qq的圖片作為背景

J. android設置背景圖片

教你如何設置背景圖片
xml文件設置背景圖片中:
任意一個控制項,button imageView 或layout,在其的xml屬性設置中,添加

[java] view plain
android:background="@drawable/bg"

即可實現設置其背景圖片為bg.
其中bg.bnp圖片存放在drawable目錄下。
drawable目錄下存放大小圖標共用的圖片。drawable-hdpi中存放240 WVGA800 的模擬器或板子用的圖片。drawable-mdpi存放對應的小圖片

[java] view plain
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/pic"/>

同樣,用src屬性,也可設置imageView的圖片為pic.png

java代碼中設置或更改一個控制項的背景圖片:

[java] view plain
Resources resources = getContext().getResources();
Drawable btnDrawable = resources.getDrawable(R.drawable.layout_bg);
layout.setBackgroundDrawable(btnDrawable);

程序中,動態修改layout的背景圖片,用setBackgroundDrawable()函數實現。設置其背景圖片為 layout_bg.png

修改imageView1的背景圖片為imageView2的背景圖片:
imageView2.getDrawable()可獲得圖片2的背景。值為Drawable類型
imageView1.setImageDrawable(drawable); 設置imageView1的背景圖片

即:

[java] view plain
imageView1.setImageDrawable(imageView2.getDrawable());