Example usage for android.widget RelativeLayout BELOW

List of usage examples for android.widget RelativeLayout BELOW

Introduction

In this page you can find the example usage for android.widget RelativeLayout BELOW.

Prototype

int BELOW

To view the source code for android.widget RelativeLayout BELOW.

Click Source Link

Document

Rule that aligns a child's top edge with another child's bottom edge.

Usage

From source file:de.sourcestream.movieDB.controller.CastDetails.java

/**
 * Updates the icons position in the movie info tap when called.
 *///from   w  ww.  j ava 2 s.  c om
public void updateIconDownPosInInfoTab() {
    RelativeLayout.LayoutParams p = (RelativeLayout.LayoutParams) castDetailsInfo.getGalleryIcon()
            .getLayoutParams();
    p.removeRule(RelativeLayout.ABOVE);
    p.removeRule(RelativeLayout.BELOW);
    p.addRule(RelativeLayout.ABOVE, R.id.moreIcon);
    p.setMargins(0, 0, (int) (23 * scale), (int) (-20 * scale));
    castDetailsInfo.getGalleryIcon().setLayoutParams(p);
    castDetailsInfo.getHomeIcon().setLayoutParams(p);
}

From source file:de.sourcestream.movieDB.controller.CastDetails.java

/**
 * Updates the icons position in the movie info tap when called.
 *//*from   ww w .j a va 2s. c om*/
public void updateIconUpPosInInfoTab() {
    RelativeLayout.LayoutParams p3 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight());
    RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(galleryIcon.getWidth(),
            galleryIcon.getHeight());
    p3.addRule(RelativeLayout.ALIGN_PARENT_END);
    p.addRule(RelativeLayout.ALIGN_PARENT_END);
    if (iconDirection == 1) {
        p3.addRule(RelativeLayout.ABOVE, R.id.moreIcon);
        p3.setMargins(0, 0, (int) (23 * scale), (int) (44 * scale));
        p.addRule(RelativeLayout.ABOVE, R.id.homeIcon);
        p.setMargins(0, 0, (int) (23 * scale), (int) (15.5f * scale));
    } else {
        p3.addRule(RelativeLayout.BELOW, R.id.moreIcon);
        p3.setMargins(0, (int) (16 * scale), (int) (23 * scale), 0);
        p.addRule(RelativeLayout.BELOW, R.id.homeIcon);
        p.setMargins(0, (int) (15.5f * scale), (int) (23 * scale), 0);
    }

    castDetailsInfo.getHomeIcon().setLayoutParams(p3);
    castDetailsInfo.getGalleryIcon().setLayoutParams(p);
}

From source file:de.sourcestream.movieDB.controller.TVDetails.java

/**
 * Updates the icons position in the movie info tap when called.
 *//*from www .ja  va2s . co m*/
public void updateIconDownPosInInfoTab() {
    RelativeLayout.LayoutParams p = (RelativeLayout.LayoutParams) tvDetailsInfo.getGalleryIcon()
            .getLayoutParams();
    p.removeRule(RelativeLayout.ABOVE);
    p.removeRule(RelativeLayout.BELOW);
    p.addRule(RelativeLayout.ABOVE, R.id.moreIcon);
    p.setMargins(0, 0, (int) (23 * scale), (int) (-20 * scale));
    tvDetailsInfo.getGalleryIcon().setLayoutParams(p);
    tvDetailsInfo.getHomeIcon().setLayoutParams(p);
}

From source file:de.sourcestream.movieDB.controller.TVDetails.java

/**
 * Updates the icons position in the movie info tap when called.
 *///from ww  w  . ja v a 2 s.c o  m
public void updateIconUpPosInInfoTab() {
    RelativeLayout.LayoutParams p3 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight());
    RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(galleryIcon.getWidth(),
            galleryIcon.getHeight());
    p3.addRule(RelativeLayout.ALIGN_PARENT_END);
    p.addRule(RelativeLayout.ALIGN_PARENT_END);
    if (iconDirection == 1) {
        p3.addRule(RelativeLayout.ABOVE, R.id.moreIcon);
        p3.setMargins(0, 0, (int) (23 * scale), (int) (44 * scale));
        p.addRule(RelativeLayout.ABOVE, R.id.homeIcon);
        p.setMargins(0, 0, (int) (23 * scale), (int) (15.5f * scale));
    } else {
        p3.addRule(RelativeLayout.BELOW, R.id.moreIcon);
        p3.setMargins(0, (int) (16 * scale), (int) (23 * scale), 0);
        p.addRule(RelativeLayout.BELOW, R.id.homeIcon);
        p.setMargins(0, (int) (15.5f * scale), (int) (23 * scale), 0);
    }

    tvDetailsInfo.getHomeIcon().setLayoutParams(p3);
    tvDetailsInfo.getGalleryIcon().setLayoutParams(p);
}

From source file:de.sourcestream.movieDB.controller.MovieDetails.java

/**
 * Updates the icons position in the movie info tap when called.
 *//*from  w  w w  .  j  a va 2s  .c  o m*/
public void updateIconDownPosInInfoTab() {
    RelativeLayout.LayoutParams p = (RelativeLayout.LayoutParams) movieDetailsInfo.getGalleryIcon()
            .getLayoutParams();
    p.removeRule(RelativeLayout.ABOVE);
    p.removeRule(RelativeLayout.BELOW);
    p.addRule(RelativeLayout.ABOVE, R.id.moreIcon);
    p.setMargins(0, 0, (int) (23 * scale), (int) (-20 * scale));
    movieDetailsInfo.getGalleryIcon().setLayoutParams(p);
    movieDetailsInfo.getTrailerIcon().setLayoutParams(p);
    movieDetailsInfo.getHomeIcon().setLayoutParams(p);
}

From source file:de.sourcestream.movieDB.controller.MovieDetails.java

/**
 * Updates the icons position in the movie info tap when called.
 *//*from   w ww  .j  av a2s  .com*/
public void updateIconUpPosInInfoTab() {
    RelativeLayout.LayoutParams p3 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight());
    RelativeLayout.LayoutParams p2 = new RelativeLayout.LayoutParams(trailerIcon.getWidth(),
            trailerIcon.getHeight());
    RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(galleryIcon.getWidth(),
            galleryIcon.getHeight());
    p3.addRule(RelativeLayout.ALIGN_PARENT_END);
    p2.addRule(RelativeLayout.ALIGN_PARENT_END);
    p.addRule(RelativeLayout.ALIGN_PARENT_END);
    if (iconDirection == 1) {
        p3.addRule(RelativeLayout.ABOVE, R.id.moreIcon);
        p3.setMargins(0, 0, (int) (23 * scale), (int) (44 * scale));
        p2.addRule(RelativeLayout.ABOVE, R.id.homeIcon);
        p2.setMargins(0, 0, (int) (23 * scale), (int) (15.5f * scale));
        p.addRule(RelativeLayout.ABOVE, R.id.trailerIcon);
        p.setMargins(0, 0, (int) (23 * scale), (int) (15 * scale));
    } else {
        p3.addRule(RelativeLayout.BELOW, R.id.moreIcon);
        p3.setMargins(0, (int) (16 * scale), (int) (23 * scale), 0);
        p2.addRule(RelativeLayout.BELOW, R.id.homeIcon);
        p2.setMargins(0, (int) (15.5f * scale), (int) (23 * scale), 0);
        p.addRule(RelativeLayout.BELOW, R.id.trailerIcon);
        p.setMargins(0, (int) (15 * scale), (int) (23 * scale), 0);
    }

    movieDetailsInfo.getHomeIcon().setLayoutParams(p3);
    movieDetailsInfo.getTrailerIcon().setLayoutParams(p2);
    movieDetailsInfo.getGalleryIcon().setLayoutParams(p);

}

From source file:com.aimfire.demo.CamcorderActivity.java

private void adjustUIControls(int rotation) {
    RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) mShutterLayout.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    layoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
    mShutterLayout.setLayoutParams(layoutParams);
    mShutterLayout.setRotation(rotation);

    layoutParams = (RelativeLayout.LayoutParams) mPvButton.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    layoutParams.addRule(RelativeLayout.ABOVE, 0);
    layoutParams.addRule(RelativeLayout.BELOW, R.id.shutter_layout);
    mPvButton.setLayoutParams(layoutParams);
    mPvButton.setRotation(rotation);//ww  w . j  a v  a2s . com

    /*
    layoutParams = (RelativeLayout.LayoutParams)mFbButton.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    layoutParams.addRule(RelativeLayout.ABOVE, R.id.shutter_layout);
    layoutParams.addRule(RelativeLayout.BELOW, 0);
    mFbButton.setLayoutParams(layoutParams);
    mFbButton.setRotation(rotation);
    */

    layoutParams = (RelativeLayout.LayoutParams) mExitButton.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
    mExitButton.setLayoutParams(layoutParams);
    mExitButton.setRotation(rotation);

    layoutParams = (RelativeLayout.LayoutParams) mView3DButton.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
    mView3DButton.setLayoutParams(layoutParams);
    mView3DButton.setRotation(rotation);

    View view3DPb = findViewById(R.id.view3D_progress_bar);
    layoutParams = (RelativeLayout.LayoutParams) view3DPb.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
    view3DPb.setLayoutParams(layoutParams);
    view3DPb.setRotation(rotation);

    layoutParams = (RelativeLayout.LayoutParams) mScanProgView.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
    layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.LEFT_OF, 0);
    layoutParams.addRule(RelativeLayout.RIGHT_OF, 0);
    mScanProgView.setLayoutParams(layoutParams);
    mScanProgView.setRotation(rotation);

    layoutParams = (RelativeLayout.LayoutParams) mScanModeButton.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
    layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.LEFT_OF, 0);
    layoutParams.addRule(RelativeLayout.RIGHT_OF, 0);
    mScanModeButton.setLayoutParams(layoutParams);
    mScanModeButton.setRotation(rotation);

    layoutParams = (RelativeLayout.LayoutParams) mLevelButton.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    mLevelButton.setLayoutParams(layoutParams);
    mLevelButton.setRotation(rotation);

    layoutParams = (RelativeLayout.LayoutParams) mTimeCounter.getLayoutParams();
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, 0);
    layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, 0);
    layoutParams.addRule(RelativeLayout.LEFT_OF, R.id.mode_button);
    layoutParams.addRule(RelativeLayout.RIGHT_OF, 0);
    layoutParams.addRule(RelativeLayout.ABOVE, 0);
    layoutParams.addRule(RelativeLayout.BELOW, 0);
    mTimeCounter.setLayoutParams(layoutParams);

    if ((rotation == 0) || (rotation == 180)) {
        mTimeCounter.setTranslationY(0);
    } else {
        mTimeCounter.setTranslationY(mTimeCounter.getWidth() / 2);
    }
    mTimeCounter.setRotation(rotation);

    CustomToast.setRotation(rotation);
}

From source file:com.max2idea.android.limbo.main.LimboActivity.java

public void promptVNCAllowExternal(final Activity activity) {
    final AlertDialog alertDialog;
    alertDialog = new AlertDialog.Builder(activity).create();
    alertDialog.setTitle("Enable VNC server");

    TextView textView = new TextView(activity);
    textView.setVisibility(View.VISIBLE);
    textView.setId(201012010);/*from  w w w . ja  v  a  2  s . c  om*/
    textView.setText("VNC Server: " + this.getLocalIpAddress() + ":" + "5901\n"
            + "Warning: VNC is not secure make sure you're on a private network!\n");

    EditText passwdView = new EditText(activity);
    passwdView.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
    passwdView.setHint("Password");
    passwdView.setEnabled(true);
    passwdView.setVisibility(View.VISIBLE);
    passwdView.setId(11111);
    passwdView.setSingleLine();

    RelativeLayout mLayout = new RelativeLayout(this);
    mLayout.setId(12222);

    RelativeLayout.LayoutParams textViewParams = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    textViewParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, mLayout.getId());
    mLayout.addView(textView, textViewParams);

    RelativeLayout.LayoutParams passwordViewParams = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);

    passwordViewParams.addRule(RelativeLayout.BELOW, textView.getId());
    // passwordViewParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,
    // mLayout.getId());
    mLayout.addView(passwdView, passwordViewParams);

    alertDialog.setView(mLayout);

    final Handler handler = this.handler;

    alertDialog.setButton("Set", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {

            // UIUtils.log("Searching...");
            EditText a = (EditText) alertDialog.findViewById(11111);

            if (a.getText().toString().trim().equals("")) {
                Toast.makeText(getApplicationContext(), "Password cannot be empty!", Toast.LENGTH_SHORT).show();
                vnc_passwd = null;
                vnc_allow_external = 0;
                mVNCAllowExternal.setChecked(false);
                // LimboSettingsManager.setVNCAllowExternal(activity, false);
                return;
            } else {
                sendHandlerMessage(handler, Const.VNC_PASSWORD, "vnc_passwd", "passwd");
                vnc_passwd = a.getText().toString();
                vnc_allow_external = 1;
                // LimboSettingsManager.setVNCAllowExternal(activity, true);
            }

        }
    });
    alertDialog.setButton2("Cancel", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
            vnc_passwd = null;
            vnc_allow_external = 0;
            mVNCAllowExternal.setChecked(false);
            // LimboSettingsManager.setVNCAllowExternal(activity, false);
            return;
        }
    });
    alertDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
        @Override
        public void onCancel(DialogInterface dialog) {
            mVNCAllowExternal.setChecked(false);
            // LimboSettingsManager.setVNCAllowExternal(activity, false);
            vnc_passwd = null;
            vnc_allow_external = 0;
        }
    });
    alertDialog.show();

}

From source file:com.max2idea.android.limbo.main.LimboActivity.java

public void promptImageName(final Activity activity, String hd) {
    final String hd_string = hd;
    final AlertDialog alertDialog;
    alertDialog = new AlertDialog.Builder(activity).create();
    alertDialog.setTitle("Image Name");

    RelativeLayout mLayout = new RelativeLayout(this);
    mLayout.setId(12222);//ww  w  .  j a  v a  2 s . co m

    EditText imageNameView = new EditText(activity);
    imageNameView.setEnabled(true);
    imageNameView.setVisibility(View.VISIBLE);
    imageNameView.setId(201012010);
    imageNameView.setSingleLine();
    RelativeLayout.LayoutParams searchViewParams = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    mLayout.addView(imageNameView, searchViewParams);

    final Spinner size = new Spinner(this);
    RelativeLayout.LayoutParams setPlusParams = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    size.setId(201012044);

    String[] arraySpinner = new String[7];
    for (int i = 0; i < arraySpinner.length; i++) {

        if (i < 5) {
            arraySpinner[i] = (i + 1) + " GB";
        }

    }
    arraySpinner[5] = "10 GB";
    arraySpinner[6] = "20 GB";

    ArrayAdapter sizeAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, arraySpinner);
    sizeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    size.setAdapter(sizeAdapter);
    setPlusParams.addRule(RelativeLayout.BELOW, imageNameView.getId());
    mLayout.addView(size, setPlusParams);

    // TODO: Not working for now
    // final TextView preallocText = new TextView(this);
    // preallocText.setText("Preallocate? ");
    // preallocText.setTextSize(15);
    // RelativeLayout.LayoutParams preallocTParams = new
    // RelativeLayout.LayoutParams(
    // RelativeLayout.LayoutParams.WRAP_CONTENT,
    // RelativeLayout.LayoutParams.WRAP_CONTENT);
    // preallocTParams.addRule(RelativeLayout.BELOW, size.getId());
    // mLayout.addView(preallocText, preallocTParams);
    // preallocText.setId(64512044);
    //
    // final CheckBox prealloc = new CheckBox(this);
    // RelativeLayout.LayoutParams preallocParams = new
    // RelativeLayout.LayoutParams(
    // RelativeLayout.LayoutParams.WRAP_CONTENT,
    // RelativeLayout.LayoutParams.WRAP_CONTENT);
    // preallocParams.addRule(RelativeLayout.BELOW, size.getId());
    // preallocParams.addRule(RelativeLayout.RIGHT_OF,
    // preallocText.getId());
    // preallocParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT,
    // preallocText.getId());
    // mLayout.addView(prealloc, preallocParams);
    // prealloc.setId(64512344);

    alertDialog.setView(mLayout);

    final Handler handler = this.handler;

    // alertDialog.setMessage(body);
    alertDialog.setButton("Create", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
            int sizeSel = size.getSelectedItemPosition();
            String templateImage = "hd1g.qcow2";
            if (sizeSel < 5) {
                templateImage = "hd" + (sizeSel + 1) + "g.qcow2";
            } else if (sizeSel == 5) {
                templateImage = "hd10g.qcow2";
            } else if (sizeSel == 6) {
                templateImage = "hd20g.qcow2";
            }

            // UIUtils.log("Searching...");
            EditText a = (EditText) alertDialog.findViewById(201012010);
            progDialog = ProgressDialog.show(activity, "Please Wait", "Creating HD Image...", true);
            // CreateImage createImg = new
            // CreateImage(a.getText().toString(),
            // hd_string, sizeInt, prealloc.isChecked());
            //            CreateImage createImg = new CreateImage(a.getText().toString(),
            //                  hd_string, sizeInt, false);
            //            createImg.execute();

            String image = a.getText().toString();
            if (!image.endsWith(".qcow2")) {
                image += ".qcow2";
            }
            createImg(templateImage, image, hd_string);

        }
    });
    alertDialog.show();

}

From source file:com.bookkos.bircle.CaptureActivity.java

private void setScanUnregisterBookView() {

    int registSelectShelfRelativeLayout_width = displayWidth;
    int registSelectShelfRelativeLayout_height = displayHeight / 3;
    int registSelectShelfRelativeLayout_x = 0;
    int registSelectShelfRelativeLayout_y = displayHeight;
    registSelectShelfRelativeLayout.setTranslationX(registSelectShelfRelativeLayout_x);
    registSelectShelfRelativeLayout.setTranslationY(registSelectShelfRelativeLayout_y);
    registSelectShelfRelativeLayout.setLayoutParams(new FrameLayout.LayoutParams(
            registSelectShelfRelativeLayout_width, registSelectShelfRelativeLayout_height));
    //registSelectShelfRelativeLayout.setVisibility(View.GONE);

    int textViewLinearLayout_width = displayWidth;
    int textViewLinearLayout_height = registSelectShelfRelativeLayout_height / 4;
    textViewLinearLayout.setLayoutParams(
            new RelativeLayout.LayoutParams(textViewLinearLayout_width, textViewLinearLayout_height));
    RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) textViewLinearLayout.getLayoutParams();
    //      params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
    params1.addRule(RelativeLayout.ALIGN_PARENT_TOP);
    textViewLinearLayout.setLayoutParams(params1);

    String tempText = "<font color=#3498db>?????!</font><br />?????????QR???, ?????\"\"????";
    tempTextView.setText(Html.fromHtml(tempText));
    tempTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, textSize - displayInch * 1.5f);

    int buttonLinearLayout_width = displayWidth;
    int buttonLinearLayout_height = registSelectShelfRelativeLayout_height / 4;
    int buttonLinearLayout_x = 0;
    int buttonLinearLayout_y = displayHeight;
    //      buttonLinearLayout.setTranslationX(buttonLinearLayout_x);
    //      buttonLinearLayout.setTranslationY(buttonLinearLayout_y);
    buttonLinearLayout.setLayoutParams(//from  w w w  .  j a  v a2  s  . co  m
            new RelativeLayout.LayoutParams(buttonLinearLayout_width, buttonLinearLayout_height));
    RelativeLayout.LayoutParams params2 = (RelativeLayout.LayoutParams) buttonLinearLayout.getLayoutParams();
    params2.addRule(RelativeLayout.BELOW, R.id.text_view_linear_layout);
    buttonLinearLayout.setLayoutParams(params2);

    int listViewLinearLayout_width = displayWidth;
    int listViewLinearLayout_height = registSelectShelfRelativeLayout_height / 2;
    int listViewLinearLayout_x = 0;
    int listViewLinearLayout_y = displayHeight;
    //      listViewLinearLayout.setTranslationX(listViewLinearLayout_x);
    //      listViewLinearLayout.setTranslationY(listViewLinearLayout_y);
    listViewLinearLayout.setLayoutParams(
            new RelativeLayout.LayoutParams(listViewLinearLayout_width, listViewLinearLayout_height));
    RelativeLayout.LayoutParams params3 = (RelativeLayout.LayoutParams) listViewLinearLayout.getLayoutParams();
    params3.addRule(RelativeLayout.BELOW, R.id.button_linear_layout);
    listViewLinearLayout.setLayoutParams(params3);
    //      listViewLinearLayout.setVisibility(View.GONE);

    int decisionButton_width = displayWidth / 5 * 2;
    //      int decisionButton_height = displayHeight / 10;
    int decisionButton_height = registSelectShelfRelativeLayout_height / 4;
    int decisionButton_x = ((displayWidth / 2) - decisionButton_width) / 2;
    int decisionButton_y = displayHeight - (titleBarHeight * 4);
    decisionButton.setTranslationX(decisionButton_x);
    //      decisionButton.setTranslationY(decisionButton_y);
    decisionButton.setLayoutParams(new LinearLayout.LayoutParams(decisionButton_width, decisionButton_height));
    decisionButton.setBackgroundColor(Color.argb(255, 230, 126, 34));
    decisionButton.setTextColor(Color.WHITE);
    decisionButton.setText("");
    decisionButton.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            doDecideClick(registSelectShelfIsbn, registSelectShelfId, registSelectShelfName);
            registButton.setEnabled(true);
            borrowReturnButton.setEnabled(true);
        }
    });

    int cancelButton_width = displayWidth / 5 * 2;
    //      int cancelButton_height = displayHeight / 10;
    int cancelButton_height = registSelectShelfRelativeLayout_height / 4;
    int cancelButton_x = ((displayWidth / 2) + decisionButton_x) - decisionButton_width;
    int cancelButton_y = displayHeight - (titleBarHeight * 4);
    cancelButton.setTranslationX(cancelButton_x);
    //      cancelButton.setTranslationY(cancelButton_y);
    cancelButton.setLayoutParams(new LinearLayout.LayoutParams(cancelButton_width, cancelButton_height));
    cancelButton.setBackgroundColor(Color.argb(255, 127, 140, 141));
    cancelButton.setText("");
    cancelButton.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            resetRegistSelectShelfData();
            animateTranslationY(registSelectShelfRelativeLayout,
                    displayHeight - displayHeight / 3 - titleBarHeight, displayHeight);
            registFlag = 0;
            registButton.setEnabled(true);
            borrowReturnButton.setEnabled(true);
        }
    });

}