Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void setInitialScreenDesign() {
- switch (LaunchPadConstants.loginnDetails.getLoginType()) {
- case LoginDetailsMgr.LOGINTYPE_STUDENT:
- StudentLeftFragment studentLeftFragment = (StudentLeftFragment) LaunchPadUtilities.getFragment(this, R.id.home_left_frag);
- if (studentLeftFragment != null) {
- if (studentLeftFragment.pollLinearLayout.setVisibility(GONE))
- {
- if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
- leftStudentLayout.getLayoutParams().width = (int) LaunchPadUtilities.convertDpToPixel(256, this);
- rightStudentLayout.getLayoutParams().width = (int) LaunchPadUtilities.convertDpToPixel(1024, this);
- int height = 550 - (Build.VERSION.SDK_INT >= 17 ? res.getInteger(R.integer.API_17_ASSIGNMENT_VIEW_DECREMENT_LAND) : 0);
- studentLeftFragment.leftLinearLayout.getLayoutParams().height = (int) LaunchPadUtilities.convertDpToPixel(height, this);
- } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
- leftStudentLayout.getLayoutParams().width = (int) LaunchPadUtilities.convertDpToPixel(256, this);
- rightStudentLayout.getLayoutParams().width = ((int) LaunchPadUtilities.convertDpToPixel(800, this) - (int) LaunchPadUtilities.convertDpToPixel(256, this));
- int height = res.getInteger(R.integer.assignmentlayoutheight)
- - (Build.VERSION.SDK_INT == 17 ? res.getInteger(R.integer.API_17_ASSIGNMENT_VIEW_DECREMENT_PORT) : 0);
- studentLeftFragment.leftLinearLayout.getLayoutParams().height = (int) LaunchPadUtilities.convertDpToPixel(height, this);
- // studentLeftFragment.leftLinearLayout.getLayoutParams().height
- // = 820;
- }
- }
- else
- {
- if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
- leftStudentLayout.getLayoutParams().width = (int) LaunchPadUtilities.convertDpToPixel(256, this);
- rightStudentLayout.getLayoutParams().width = (int) LaunchPadUtilities.convertDpToPixel(1024, this);
- int height = 340 - (Build.VERSION.SDK_INT >= 17 ? res.getInteger(R.integer.API_17_ASSIGNMENT_VIEW_DECREMENT_LAND) : 0);
- studentLeftFragment.leftLinearLayout.getLayoutParams().height = (int) LaunchPadUtilities.convertDpToPixel(height, this);
- } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
- leftStudentLayout.getLayoutParams().width = (int) LaunchPadUtilities.convertDpToPixel(256, this);
- rightStudentLayout.getLayoutParams().width = ((int) LaunchPadUtilities.convertDpToPixel(800, this) - (int) LaunchPadUtilities.convertDpToPixel(256, this));
- int height =800 - (Build.VERSION.SDK_INT == 17 ? res.getInteger(R.integer.API_17_ASSIGNMENT_VIEW_DECREMENT_PORT) : 0);
- studentLeftFragment.leftLinearLayout.getLayoutParams().height = (int) LaunchPadUtilities.convertDpToPixel(height, this);
- // studentLeftFragment.leftLinearLayout.getLayoutParams().height
- // = 820;
- }
- }
- }
- break;
- default:
- break;
- }
- }
- if(studentLeftFragment.pollLinearLayout.getVisibility() == View.VISIBLE)
- {
- studentLeftFragment.pollLinearLayout.setVisibility(GONE);
- ...
- ...
- }
Add Comment
Please, Sign In to add comment