Commits

Yuki KODAMA committed 6b2820c

core: refresh AP list on visible

Use "MATCH_PARENT" instead of "FILL_PARENT" coz it's deprecated constant.

Comments (0)

Files changed (1)

src/net/endflow/apps/wifiho/WifiHandoverActivity.java

     }
     
     @Override
+    public void onStart() {
+    	super.onStart();
+    	
+    	if (mService == null) {
+    		return;
+    	}
+    	
+    	Log.i(TAG, "onStart: activity is shown, refresh AP list");
+    	mService.startScan();
+    }
+    
+    @Override
     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo info) {
     	menu.setHeaderTitle("Wifi Handover");
     	
 		RelativeLayout.LayoutParams params = null;
     	if (mService.isPowered()) {
     		params = new RelativeLayout.LayoutParams(
-    				RelativeLayout.LayoutParams.FILL_PARENT, 0);
+    				RelativeLayout.LayoutParams.MATCH_PARENT, 0);
     	} else {
     		params = new RelativeLayout.LayoutParams(
-    				RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
+    				RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
     	}
     	params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
     	ll.setLayoutParams(params);