跳到主要內容

[Android]在XML String Resource中定義參數式字串


格式化數字:
%幾$  d    -- for整數
            s    -- for字串

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="Iam">我是%1$s</string>
   <string name="server_registering">Trying (attempt %1$d/%2$d) to register device on Demo Server.</string>
</resources>

留言

這個網誌中的熱門文章

[Qt][Embedded][PXA270]
Porting Qt 4.8.6 for Creator XScale PXA270

這篇文章介紹這學期我在嵌入式作業系統課程,使用Creator XScale PXA270板子的一些學習筆記與製作final project的一些過程,歡迎各位多多指教~ 背景介紹 Creator XScale PXA270開發版是一塊由 新華電腦(microtime) 公司出品的 模組化XScale/ARM/SoC/FPGA/DSP嵌入式行動通訊發展平台 ,在此課程與final project主要使用的是"Create XScale‐PXA270 子板"與"MTLCD‐0708048 LCD Module",在Create XScale‐PXA270子板上的為Intel(現在已出售給Marvell)的 Xscale系列 PXA270 處理器,基於ARMv5TE架構指令集,在旁附有SDRAM Memory 64MB、Flash Memory 32MB、SD Card Connectors、RJ45 10/100 Base‐T Ethernet Interface、USB 1.1 Device/Host Port各一、AC97 Audio Codec(Line_in、Mic_in、Headphone)、ADC Interface*4、PWM Interface、CMOS Camera Interface、TFT-LCD Interface、GPIO Interface...等;在軟體功能部分,由新華科技提供了GNU GCC cross compiler toolchain(arm-unknown-linux-gnu-gcc 4.0.2)、Uboot 1.1.5、Linux Kernel 2.6.15.3與patch(提供支援子板上的Ethernet、USB Host、TFT‐LCD(Frame buffer、Touch Screen)、AC97‐Codec...等與母板LED、7‐Seg LED、Key Pad...等的device driver)、rootfs,相關的實驗環境設定可以參考 User Guide 。 看到以上這麼多的軟硬體介面,別以為這板子有多強,其實這是 2006 年 ASUS P535 手機使用的規格了,不禁讓人感嘆科技進步之快阿~ 在此附上開發版本尊 Qt 是自由且開放原始碼的跨平台C...

Run Android VTS with Android R emulator through WSL

Background Android VTS The Android Vendor Test Suite (VTS) provides extensive new functionality for Android testing and promotes a test-driven development process. Android R emulator Run the latest Android R image from Google CI build artifacts WSL WSL is a collection of components that enables native Linux ELF64 binaries to run on Windows . It contains both user mode and kernel mode components. It is primarily comprised of: User mode session manager service that handles the Linux instance life cycle Pico provider drivers (lxss.sys, lxcore.sys) that emulate a Linux kernel by translating Linux syscalls Pico processes that host the unmodified user mode Linux (e.g. /bin/bash) It is the space between the user mode Linux binaries and the Windows kernel components where the magic happens. By placing unmodified Linux binaries in Pico processes we enable Linux system calls to be directed into the Windows kernel. The lxss.sys and lxcore.sys drivers translate the Linux s...

[Qt][Embedded][PXA270][Touch Screen][tslib]
在Qt 4.8.6 for Creator XScale PXA270支援觸控螢幕

這篇文章介紹在Qt 4.8.6 for Creator XScale PXA270上支援觸控螢幕一些過程,歡迎各位多多指教~ 背景介紹 上一篇文章 Porting Qt 4.8.6 for Creator XScale PXA270介 紹如何cross compile Qt 4.8.6 此篇接續該篇的結果繼續說明支援觸控螢幕的步驟 首先拜問Google大神,尋找參考資料: 官方文件提供了詳細的說明:  Qt for Embedded Linux Pointer Handling 甚至有論文( Wang Xibo; Yang Jianan, "Add Touch Screen Support for QT/Embedded," in  Computer Science-Technology and Applications, 2009. IFCSTA '09. International Forum on  , vol.3, no., pp.303-306, 25-27 Dec. 2009 doi: 10.1109/IFCSTA.2009.314 )專門討論如何在Qt上支援觸控螢幕... 在這裡我們使用官網的Tslib Mouse Driver方案!! Tslib,顧名思義就是Touch Screen Library(此句來源: 小耕的隨手筆記: TSLIB on Android gingerbread ),提供觸控螢幕矯正、過濾雜訊...等功能,據資料指出Android也有使用到該library,詳細資訊可以看作者github的README: https://github.com/kergoth/tslib 加入與修改tslib 由Github下載tslib-1.1版、解壓縮並進行修改 wget https://github.com/kergoth/tslib/archive/1.1.tar.gz tar zxvf 1.1.tar.gz cd tslib-1.1/ 修改一 、首先是修改etc/ts.conf,將第二行module_raw input取消註解 # Uncomment if you wish to use the linux input layer event interface mod...