示例#1
0
 public static Object prepareLayoutCache(DialogWireframe wireframe, TelegramApplication context) {
   checkResources(context);
   DialogLayout hl = new DialogLayout();
   hl.build(wireframe, UiMeasure.METRICS.widthPixels, px(80), context);
   DialogLayout wl = new DialogLayout();
   wl.build(wireframe, UiMeasure.METRICS.heightPixels, px(80), context);
   return new DialogLayout[] {hl, wl};
 }
示例#2
0
  private void buildLayout() {
    layout = null;
    if (preparedLayouts != null) {
      int w = getMeasuredWidth();
      for (int i = 0; i < preparedLayouts.length; i++) {
        if (preparedLayouts[i].layoutW == w) {
          layout = preparedLayouts[i];
          break;
        }
      }
    }

    if (layout == null) {
      layout = new DialogLayout();
      layout.build(description, getMeasuredWidth(), getMeasuredHeight(), application);
    }
  }