android 在 「左側listview fragment+ 右側 Detail Fragment」型態中的master-detail flow中,如何做到切換左側的master時,先執行右側 detail的防呆?
好長的文章抬頭是吧
等你實作時,一定會遇到detail fragment 防呆沒跑就切換master item的問題了
系統整合就像交響曲一樣,各部都有表現的機會,但,也必須恰如其份地表現,才是完美地呈現IT獨有的真善美--儘可能地用最小的成本來解決最複雜的問題,皆大歡喜
好長的文章抬頭是吧
GCM client如果有按照google API console 開設好server key 及GCM enable
照之前上篇說的,把「SQL server Configuration Manger 」準備好之後,進入,
一,一定要有要IIS 8也就是你要灌win8/win2012以上
假設,目前是在win7上面的virutalbox之中安裝了windows server 2012
因為vdi裡面有UUID,不是直接copy & move就可以了,這是需要用到他的指令來完成
VBoxManage clonevdi /my/path/to/one.vdi /my/path/to/two.vdi
另外最常問到的是硬碟空間不夠大,如果加大?
VBoxManage modifyhd
"C:\Users\autosun\VirtualBox VMs\ArchLinux\ArchLinux.vdi"
--resize 50000
(數字單位是mega)
改完後再到作業系統內去修改調整磁區分割大小
EditText 類別setText遇到數字型態會出錯?
注意順序,是先加入RadioGroup再設定其checked Id.
這問題花了我幾小時,最後還是在另一本書上看到的
since ScrcollView is not allow to add a scrollable listview
public static void setListViewHeightBasedOnChildren(ListView listView) {
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null) {
// pre-condition
return;
}
int totalHeight = 0;
for (int i = 0; i < listAdapter.getCount(); i++) {
View listItem = listAdapter.getView(i, null, listView);
listItem.measure(0, 0);
totalHeight += listItem.getMeasuredHeight();
}
ViewGroup.LayoutParams params = listView.getLayoutParams();
params.height = totalHeight + (listView.getDividerHeight() * (listAdapter.getCount() - 1));
listView.setLayoutParams(params);
}
===================================
=======in your activity,override the
onWindowFocusChanged event=============
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
ScrollView scrollView = (ScrollView) findViewById(R.id.someScrollView);
scrollView.scrollTo(0, 0);
}
======================================================================
有時我們必須列舉容器(container/panel)的內容