목록2013/06/27 (2)
오늘도 공부
public class CloneMainCls { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try { MyNumbers mn = new MyNumbers(); MyNumbers mn2 = (MyNumbers) mn.clone(); mn2.getNumbers()[1] = 3; System.out.println(mn.getNumbers()[1] + ":" + mn2.getNumbers()[1]); } catch (Exception e) { e.printStackTrace(); } } } class MyNumbers implements Cloneable{ private int[]..
public static void showAsPopup(Activity activity) { //To show activity as dialog and dim the background, you need to declare android:theme="@style/PopupTheme" on for the chosen activity on the manifest activity.requestWindowFeature(Window.FEATURE_ACTION_BAR); activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND, WindowManager.LayoutParams.FLAG_DIM_BEHIND); LayoutParams params..
