導航:首頁 > 操作系統 > android顯示

android顯示

發布時間:2022-02-01 10:13:50

android怎麼讓一個界面顯示一個界面上

你可以這樣做,開啟一個線程,這個線程啟動後睡兩秒,兩秒之後給主線程發一個消息,在主線程的handleMessage裡面跳轉到另一個界面。

❷ android編程如何顯示大量文本

如果是產品製作方向——

由於手機屏幕的限制,和屏幕大小的問題
顯示大量文字,在產品方面,我們一般放棄使用縮小字體類似的方法
一般的做法都是讓文本可以上下滑動來進行閱讀

如果按照上下滑動思路就很簡單了
使用ScrollView,內部嵌套一個TextView就可以了

可以來個簡單範例
============================
<ScrollView

android:id="@+id/scrollView1"

android:layout_width="match_parent"

android:layout_height="match_parent" >

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical" >

<TextView

android:id="@+id/textView1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="要顯示的大段文字" />

</LinearLayout>

</ScrollView>
==========================

如果是說編程界面——
如果開發使用ADT可以
在首選項中選擇常規——編輯器——文本編輯器,這里可以任意修改文字大小、顏色等

❸ android圖片顯示的幾種辦法

方法1:TextView顯示

java"><TextView
android:id="@+id/textview_01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_launcher"
android:text="hello_world"/>

第二種方式:顯示項目中的圖片

mTextView02=(TextView)findViewById(R.id.textview_02);
//把圖片生成的ID加入img標簽中<imgsrc='123'>
StringhtmlFor02="項目圖片測試:"+"<imgsrc='"+R.drawable.ic_launcher+"'>"+"<imgsrc='"
+R.drawable.apple+"'>";
mTextView02.setText(Html.fromHtml(htmlFor02,newHtml.ImageGetter(){
@Override
publicDrawablegetDrawable(Stringsource){
Log.d(TAG,"項目圖片測試_source:"+source);
intid=Integer.parseInt(source);
Drawabledrawable=getResources().getDrawable(id,null);
drawable.setBounds(0,0,drawable.getIntrinsicWidth(),
drawable.getIntrinsicHeight());
returndrawable;
}
},null));

❹ android如何顯示arraylist數據

用適配器把,baseAdapter,然後Listview。setAdapter.....

❺ android用什麼控制項顯示數據

不和.net中的DataGridView類似,這跟DataGridView差別太大了。
Android沒有類似DataGridView的控制項,你要顯示資料庫中查詢的內容,可以通過ListView的方式,在ListView裡面定義布局信息,實現出來的效果會跟DataGridView類似,但不能修改、改變格之間的距離等。

❻ android怎樣顯示資料庫數據

使用android內嵌式資料庫存儲數據,有個sqliteopenhelper資料庫幫助類,這個類的對象可以對資料庫進行查詢,查詢返回的的是一個cursor類結果集,然後用cursoradapter進行數據適配。

❼ android顯示數據有哪些方法

你的問題很模糊。
我嘗試回答下:
Textview顯示
Listview等等,具體要看你顯示什麼數據,以什麼形式顯示

❽ android先隱藏然後點擊按鈕顯示怎麼實現

設置setVisibility 為gone 點擊按鈕設置為visible

❾ android怎麼顯示系統時間

import java.util.Calendar;
import android.app.Activity;import android.os.Bundle;
public class GetSystemTime001Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Calendar c=Calendar.getInstance();

String time=c.get(Calendar.YEAR)+"-"+ //得到年
formatTime(c.get(Calendar.MONTH)+1)+"-"+//month加一 //月
formatTime(c.get(Calendar.DAY_OF_MONTH))+" "+ //日
formatTime(c.get(Calendar.HOUR_OF_DAY))+":"+ //時
formatTime(c.get(Calendar.MINUTE))+":"+ //分
formatTime(c.get(Calendar.SECOND)); //秒
System.out.println(time); //輸出
}

private String formatTime(int t){
return t>=10? ""+t:"0"+t;//三元運算符 t>10時取 ""+t
}
}

❿ android怎麼顯示方法的時間

回答:Android 手機,讓時間在任何界面都顯示,
有三種辦法:如下
一是狀態欄常顯,
二是使用第三方軟體,
三是使用第三方ROM。
拓展補充:
【狀態欄常顯】
常見的軟體裡面,都有是否全屏選項,請設置為不全屏,狀態欄就會顯示,就會顯示時間了。(對於Android 5.0及以上的系統,請禁用「沉浸式狀態欄」。)當然這種辦法有局限性,那麼請看第二種方法。
【使用第三方軟體】
可以下載「懸浮時間」這款軟體,該軟體是一款可以懸浮在屏幕上的時間顯示器,能幫助用戶在全屏狀態下也可以看到時間。

閱讀全文

與android顯示相關的資料

熱點內容
什麼魚的按摩app 瀏覽:499
雲電腦的伺服器網站 瀏覽:437
木工專用空氣壓縮機 瀏覽:177
synfloodlinux 瀏覽:83
linux卸載openssl 瀏覽:100
python爬蟲網址要求 瀏覽:966
什麼是金稅盤伺服器 瀏覽:437
phpsocket開發 瀏覽:509
caj文檔轉pdf 瀏覽:552
eclipsemaven命令配置 瀏覽:337
雅安視監控app叫什麼名字 瀏覽:731
東方財富app籌碼藍色和紅色是什麼 瀏覽:566
pr安裝文件夾圖標變白 瀏覽:179
如何用伺服器建設網站 瀏覽:349
定時鬧鍾單片機課程設計 瀏覽:537
腰椎壓縮性骨折症狀 瀏覽:466
絕地求生全軍出擊的伺服器什麼時候開 瀏覽:493
怎麼入侵游戲伺服器篡改數據 瀏覽:736
線性壓縮機原理 瀏覽:543
javanewinstance 瀏覽:817