瀏覽單個文章
公不
*停權中*
 

加入日期: Dec 2010
文章: 341
Lightbulb [?]Android App的View寫法 與 待遇

想要請問一下

在Android中

AlertDialog是透過R.java取得xml拉好的layout

然後經由LayoutInflater轉成View呈現

代碼:
LayoutInflater inflater = (LayoutInflater)Main.this.getSystemService(LAYOUT_INFLATER_SERVICE);

View alertView = inflater.inflate(R.layout.mylayout, null);



現在想說

將這個xml的layout改由java直接new的方式

整個by code方式寫

請問這樣之下

該如何轉到View

因為如果還是用LayoutInflater來呼叫

會出現fc有

android.content.res.Resources$NotFoundException: Resource ID ‪#‎0xa錯誤訊息
-----------------------------------------------------

看來台灣目前還是對軟體非常的看扁?

台北/新竹 起薪33K算是高薪 ?!!!

由硬體轉職軟體

拿40K就算是拿高資歷薪資 ?!!!


謝謝
     
      
舊 2014-06-01, 12:35 AM #1
回應時引用此文章
公不離線中