private void setWeigtnMemory(float k,int visibility){
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, 0);
float v = context.getResources().getDisplayMetrics().density;
params.weight = k;
params.topMargin = (int) (20*v);
params.leftMargin = (int) (10*v);
params.rightMargin = (int) (10*v);
relativeMemory.setVisibility(visibility);
relativeWeigth.setLayoutParams(params);
}
setWeigtnMemory(1.2f,View.GONE);
setWeigtnMemory(2.4f,View.VISIBLE);