Esempio n. 1
0
 public void setTextSize(int res, int heightTextView) {
   VNPResize.getInstance().setTextsize(findViewById(res), heightTextView);
   LogUtils.e(
       "ABCD",
       heightTextView
           + " : "
           + (findViewById(res) == null)
           + " "
           + VNPResize.getInstance().getTextSize());
 }
Esempio n. 2
0
  protected void onResume() {
    VNPResize resize = VNPResize.getInstance();
    resize.resizeSacle(findViewById(R.id.loginactivity_img), LayoutParams.MATCH_PARENT, 129);
    resize.resizeSacle(findViewById(R.id.loginactivity_button1), 300, 45);
    resize.resizeSacle(findViewById(R.id.loginactivity_button2), 266, 46);
    resize.resizeSacle(findViewById(R.id.loginactivity_butto3), 300, 45);

    resize.resizeSacle(findViewById(R.id.loginactivity_btncancel), 90, 40);
    resize.resizeSacle(findViewById(R.id.loginactivity_text), 530 / 2, 67);
    //		resize.setTextsize(findViewById(R.id.loginactivity_button1),
    //				MintUtils.TEXTSIZE_BUTTON);
    //		resize.setTextsize(findViewById(R.id.loginactivity_button2),
    //				MintUtils.TEXTSIZE_BUTTON);
    //		resize.setTextsize(findViewById(R.id.loginactivity_butto3),
    //				MintUtils.TEXTSIZE_BUTTON);

    resize.resizeSacle(findViewById(R.id.loginactivity_edt1_background), 300, 48);
    resize.resizeSacle(findViewById(R.id.loginactivity_edt2_background), 300, 46);
    resize.resizeSacle(findViewById(R.id.loginactivity_edt1), 280, 48);
    resize.resizeSacle(findViewById(R.id.loginactivity_edt2), 280, 46);

    resize.setTextsize(findViewById(R.id.loginactivity_edt1), 20);
    resize.setTextsize(findViewById(R.id.loginactivity_edt2), 20);

    //		resize.setTextsize(findViewById(R.id.loginactivity_text),
    //				MintUtils.TEXTSIZE_EDITTEXT);
  }
Esempio n. 3
0
public class BaseFragment extends Fragment {
  private ProgressDialog dialog;

  /** @param show */
  protected void showProgressDialog(boolean show) {
    if (show) {
      if (dialog == null) {
        dialog = ProgressDialog.show(getActivity(), null, "loadding ... ");
      }
    } else {
      if (dialog != null) dialog.dismiss();

      dialog = null;
    }
  }

  protected VNPResize resize = VNPResize.getInstance();

  public BaseFragment() {
    super();
  }

  public String getStringFromView(int res) {

    View v = getView().findViewById(res);
    if (v instanceof TextView) {
      return ((TextView) v).getText().toString().trim();
    }

    return null;
  }
}
Esempio n. 4
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   VNPResize.getInstance().init(this, 320, 480, null, null);
 }
Esempio n. 5
0
 public void setTextSize(TextView boldTextView, int mainM2Text2) {
   VNPResize.getInstance().setTextsize(boldTextView, mainM2Text2);
 }
Esempio n. 6
0
 public void resize(int res, int width, int height) {
   VNPResize.getInstance().resizeSacle(findViewById(res), width, height);
 }