下圖定位 float window 式的設計十分普遍, 但 justcloud.com 的這個登記頁, 大家可以看到在 -OR- 下面的東面不夠位顯示, 筆者無論如何向下拉也見不到(因為是定位式). 筆者螢幕解像度為 1366x768px, 768px 這個高度的螢幕相信仍然十分多, 如果在登記頁就令人却步可不是好事.
作為用家解決方法還是有的, 將顯示比例縮小就成!
粉嶺公路近港鐵粉嶺站
獅子山隧道公路近紅梅谷路
港深西部公路近廈村
元朗公路近丹桂村
大欖隧道元朗入口
大欖隧道汀九入口
南灣隧道昂船洲大橋入口
沙田嶺隧道沙田入口
象鼻山路近美環街
西區海底隧道香港入口
西區海底隧道九龍入口
大老山隧道九龍入口
東區海底隧道九龍入口
大老山隧道沙田入口
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /** * Adds a touchable padding around a View by constructing a TouchDelegate * and adding it to parent View. * @param parent The "outer" parent View * @param delegate The delegate that handles the TouchEvents * @param topPadding Additional touch area in pixels above View * @param bootomPadding Additional touch area in pixels below View * @param topPadding Additional touch area in pixels left to View * @param topPadding Additional touch area in pixels right to View * @return A runnable that you can post as action to a Views event queue */ private static Runnable getTouchDelegateAction(final View parent, final View delegate, final int topPadding, final int bottomPadding, final int leftPadding, final int rightPadding) { return new Runnable() { @Override public void run() { //Construct a new Rectangle and let the Delegate set its values Rect touchRect = new Rect(); delegate.getHitRect(touchRect); //Modify the dimensions of the Rectangle //Padding values below zero are replaced by zeros touchRect.top-=Math.max(0, topPadding); touchRect.bottom+=Math.max(0, bottomPadding); touchRect.left-=Math.max(0, leftPadding); touchRect.right+=Math.max(0, rightPadding); //Now we are going to construct the TouchDelegate TouchDelegate touchDelegate = new TouchDelegate(touchRect, delegate); //And set it on the parent parent.setTouchDelegate(touchDelegate); } |
1 2 3 4 5 6 | //Get references to the View in the layout parent = (View) findViewById(R.id.parent); delegateButton = (View) findViewById(R.id.cmdClickMe); //The TouchDelegate has to be set after everything has been calculated and drawn parent.post(getTouchDelegateAction(parent, delegateButton, 50,50,50,50)); |