android.widget.TableRow.LayoutParams的实例源码

项目:rpgpack-android    文件TableFragment.java   
@SuppressWarnings("deprecation")
    protected void setAddButtonStyle(TextView text){
        TableRow.LayoutParams textViewParams = new TableRow.LayoutParams();
        display display = getActivity().getwindowManager().getDefaultdisplay();
        Point size = new Point();
        display.getSize(size);
        int width = size.x;
        int height = size.y;
        textViewParams.height = height;
        textViewParams.width = width;
//      Log.d("width","SCREEN.x == " + width);
        text.setMaxWidth(width);
        String uri = "@drawable/cell_shape_add";
        int imageResource = getResources().getIdentifier(uri,null,getActivity().getPackageName());
        Drawable res = getResources().getDrawable(imageResource);
        if (android.os.Build.VERSION.SDK_INT >= 16){
            text.setBackground(res);
        }
        else{
            text.setBackgroundDrawable(res);
        }
        text.setTextColor(getResources().getColor(R.color.own_grey));
        text.setSingleLine();
    }
项目:MyFlightbookAndroid    文件ActCurrency.java   
private void BindTable() {
    TableLayout tl = (TableLayout) findViewById(R.id.tblCurrency);
    if (tl == null)
        throw new NullPointerException("tl is null in BindTable (ActCurrency)!");
    tl.removeAllViews();
    LayoutInflater l = getActivity().getLayoutInflater();

    if (m_rgcsi == null)
        return;

    for (CurrencyStatusItem csi : m_rgcsi) {
        try {
            // TableRow tr = new TableRow(this);

            TableRow tr = (TableRow) l.inflate(R.layout.currencyrow,tl,false);
            TextView tvAttribute = tr.findViewById(R.id.txtCsiAttribute);
            TextView tvValue = tr.findViewById(R.id.txtCsiValue);
            TextView tvdiscrepancy = tr.findViewById(R.id.txtCsidiscrepancy);

            tvAttribute.setText(csi.Attribute);
            tvValue.setText(csi.Value);
            tvdiscrepancy.setText(csi.discrepancy);
            if (csi.discrepancy.length() == 0)
                tvdiscrepancy.setVisibility(View.GONE);

            tvAttribute.setTextColor(Color.BLACK);
            tvdiscrepancy.setTextColor(Color.BLACK);
            if (csi.Status.compareto("NotCurrent") == 0)
                tvValue.setTextColor(Color.RED);
            else if (csi.Status.compareto("GettingClose") == 0)
                tvValue.setTextColor(Color.BLUE);
            else
                tvValue.setTextColor(Color.argb(255,128,0));

            tl.addView(tr,new TableLayout.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
        } catch (NullPointerException ex) { // should never happen.
            Log.e(MFBConstants.LOG_TAG,Log.getStackTraceString(ex));
        }
    }
}
项目:FMTech    文件HistogramTable.java   
protected void onMeasure(int paramInt1,int paramInt2)
{
  super.onMeasure(paramInt1,paramInt2);
  if ((this.mLabelsOn) && (!this.mBars.isEmpty()))
  {
    int i = 0;
    for (int j = 0; j < getChildCount(); j++)
    {
      View localView1 = getChildAt(j);
      if ((localView1 instanceof TableRow))
      {
        TableRow localTableRow = (TableRow)localView1;
        int m = 0;
        for (int n = 0; n < localTableRow.getChildCount(); n++)
        {
          View localView2 = localTableRow.getChildAt(n);
          TableRow.LayoutParams localLayoutParams = (TableRow.LayoutParams)localView2.getLayoutParams();
          m += localLayoutParams.leftMargin + localView2.getMeasuredWidth() + localLayoutParams.rightMargin;
        }
        if (m - localTableRow.getMeasuredWidth() > i) {
          i = m - localTableRow.getMeasuredWidth();
        }
      }
    }
    if (i > 0)
    {
      for (int k = 0; k < this.mBars.size(); k++) {
        ((HistogramBar)this.mBars.get(k)).setMaxBarWidth(this.mMaxBarWidth - i);
      }
      this.mBars.clear();
    }
  }
}
项目:SIT    文件TableActivity.java   
private TextView createTextView(boolean endline,boolean endcolumn){
    TextView text = new TextView(this,R.style.frag2HeaderCol);
    int bottom = endline ? 1 : 0;
    int right = endcolumn ? 1 :0;
    LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT,0.3f);
    params.setMargins(1,1,right,bottom);
    text.setLayoutParams(params);
    text.setPadding(4,4,10,4);
    text.setBackgroundColor(getResources().getColor(R.color.white));
    return text;
}
项目:SIT    文件TableFragment.java   
private TextView createTextView(boolean endline,boolean endcolumn){
    TextView text = new TextView(getActivity(),4);
    text.setBackgroundColor(getResources().getColor(R.color.white));
    return text;
}
项目:AquaBase    文件DetailsFragment.java   
@Override
public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle bundle) {
    View rootView = inflater.inflate(R.layout.fragment_details,container,false);

    // Fill the table layout with rows for the fields depending on the item
    TableLayout table = (TableLayout)rootView.findViewById(R.id.TableLayout);

    for (int i = 0; i < mLabelIds.size(); i++) {
        // Don't switch to an inflated XML file for each row: way too slow
        TableRow row = new TableRow(getActivity());
        row.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
        row.setPadding(0,3,3);

        TextView titleView = new TextView(getActivity());
        titleView.setText(mLabelIds.get(i));
        titleView.setPadding(0,12,0);
        titleView.setGravity(Gravity.TOP);
        titleView.setTypeface(Typeface.DEFAULT_BOLD);
        row.addView(titleView);

        TextView valueView = new TextView(getActivity());
        valueView.setText(mValues.get(i));
        titleView.setGravity(Gravity.TOP);
        row.addView(valueView);

        table.addView(row,new TableLayout.LayoutParams(
                                LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
    }

    return rootView;
}
项目:Testes    文件TableLayoutActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.layout_scroll);

    TableLayout tableLayout=(TableLayout) findViewById(R.id.table_layout);
    TableRow row= new TableRow(this);
    TableRow.LayoutParams rowLayoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT,TableRow.LayoutParams.WRAP_CONTENT);
    row.setLayoutParams(rowLayoutParams);
    TableRow row2= new TableRow(this);
    TextView tv1 = new TextView(this);
    tv1.setSingleLine(false);
    tv1.setEllipsize(null);
    tv1.setTextSize(getResources().getDimension(R.dimen.textsize));
    tv1.setLayoutParams(new TableRow.LayoutParams(0,LayoutParams.WRAP_CONTENT,1f));
    tv1.setHorizontallyScrolling(false);
    tv1.setText("THIS LINE OF THEXT SHOULD BE SINGFLE. DOUBLE MAYBE?");

    TextView tv2 = new TextView(this);
    tv2.setSingleLine(false);
    tv2.setEllipsize(null);
    tv2.setTextSize(getResources().getDimension(R.dimen.textsize));
    tv2.setLayoutParams(new TableRow.LayoutParams(0,1f));
    tv2.setHorizontallyScrolling(false);
    tv2.setText("THIS LEINBE HAS to be multiline also?");

    row.addView(tv1);
    row2.addView(tv2);
    tableLayout.addView(row,2);
    tableLayout.addView(row2,3);

}
项目:terraingis    文件AttributesFragment.java   
/**
 * buttons for view next items
 * @param next
 */
private void addNextPrevIoUsItemsButton(boolean next)
{
    Button button = new Button(mMainActivity);

    int[] range;
    if(next)
    {
        button.setonClickListener(nextItemsHandler);
        range = getNextRange();
    }
    else
    {
        button.setonClickListener(prevIoUsItemsHandler);
        range = getPrevIoUsRange();
    }

    button.setText(String.format("%d-%d",range[0]+1,range[1]+1));

    TableRow.LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,ConvertUnits.dp2px(HEIGHT_BUTTON_DP));
    params.span = mLayer.getAttributeHeader().getCountColumns();
    button.setLayoutParams(params);

    TableRow row = new TableRow(mMainActivity);
    row.addView(button);
    mTable.addView(row);
}
项目:buildAPKsApps    文件Hof.java   
public void loadHofTable(){

    TableLayout tl = (TableLayout)findViewById(R.id.hoftable);       

String filecontent = getStringFromFile("halloffame");        

      if (filecontent != "") {

       String scores[] = filecontent.split(";");

       for (int i=0; i<scores.length; i++){

        String score[];
        score = scores[i].split(",");

        TableRow tr = new TableRow(this);
           tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));

           TextView points = new TextView(this);
           points.setGravity(Gravity.CENTER_VERTICAL);
           points.setGravity(Gravity.CENTER_HORIZONTAL);
           points.setTextColor(Color.BLACK);
           points.setText(score[0]);
           points.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
           tr.addView(points);

           TextView playername = new TextView(this);
           playername.setGravity(Gravity.CENTER_VERTICAL);
           playername.setGravity(Gravity.CENTER_HORIZONTAL);
           playername.setTextColor(Color.BLACK);
           playername.setText(score[1]);
           playername.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
           tr.addView(playername);

           TextView dat = new TextView(this);
           dat.setGravity(Gravity.CENTER_VERTICAL);
           dat.setGravity(Gravity.CENTER_HORIZONTAL);
           dat.setTextColor(Color.BLACK);
           dat.setText(score[2]);
           dat.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
           tr.addView(dat);

           tl.addView(tr,new TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));     
       }
      }  
  }
项目:Steppy-Android    文件ShowLocalStep.java   
private void BuildTable() {

  sqlcon.open();
  Cursor c = sqlcon.readEntry();

  int rows = c.getCount();
  int cols = c.getColumnCount();

  c.movetoFirst();

  // outer for loop
  for (int i = 0; i < rows; i++) {

   TableRow row = new TableRow(this);
   row.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));

   // inner for loop
   for (int j = 0; j < cols; j++) {

    TextView tv = new TextView(this);
    tv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
 //   tv.setBackgroundResource(R.drawable.cell_shape);
    tv.setGravity(Gravity.CENTER);
    tv.setTextSize(18);
    tv.setPadding(0,5,5);

    tv.setText(c.getString(j));

    row.addView(tv);

   }

   c.movetoNext();

   table_layout.addView(row);

  }
/*  int tLastStep = 0;
  String tgl = "";
  Cursor tCursor = sqlcon.getLast();
  if (tCursor != null) {
        tLastStep = tCursor.getInt(0);
        tgl = tCursor.getString(4);
        tCursor.close();
    }

  Toast.makeText(ShowLocalStep.this,"Last step : "+Integer.toString(tLastStep)+" - "+tgl,Toast.LENGTH_LONG)
            .show();
            */
  sqlcon.close();

 }
项目:Newton_for_Android_AS    文件LoginFragment.java   
@Override
public void onViewCreated(View view,Bundle savedInstanceState) {
    super.onViewCreated(view,savedInstanceState);

    setTitleText(R.string.login_bt);

    Context context = getActivity();

    //注册按钮
    Button registerBtn = new Button(context);
    registerBtn.setId(ID_REGISTER_BTN);
    registerBtn.setText(R.string.register_btn);
    registerBtn.setTextSize(17);
    registerBtn.setTextColor(Color.WHITE);
    registerBtn.setBackgroundResource(R.drawable.button_focused);
    registerBtn.setonClickListener(this);

    RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(
            UIUtil.dip2px(context,60),LayoutParams.MATCH_PARENT);
    lp2.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    lp2.addRule(RelativeLayout.CENTER_VERTICAL);
    addViewInTitleBar(registerBtn,lp2);

    //登录按钮
    Button loginBtn = (Button) view.findViewById(R.id.login_bt);
    loginBtn.setonClickListener(this);
    loginBtn.setBackgroundDrawable(StateList.get());

    view.findViewById(R.id.qq_login_btn).setonClickListener(this);
    view.findViewById(R.id.wechat_login_btn).setonClickListener(this);
    view.findViewById(R.id.sina_weibo_login_btn).setonClickListener(this);

    userNameEdit = (EditText) view.findViewById(R.id.username);
    passwordEdit = (EditText) view.findViewById(R.id.userpass);

    // 获取用户信息
    UserInfo userInfo = UserManager.getInstance().getUserInfo();
    if (userInfo != null) {
        userNameEdit.setText(userInfo.getUserName());
        passwordEdit.setText(userInfo.getpassword());
    }

    view.findViewById(R.id.forget_password_text).setonClickListener(this);
}
项目:Newton_for_Android_AS    文件IndividualCenterFragment.java   
@Override
public void onViewCreated(View view,savedInstanceState);

    setTitleText(R.string.individualCenterFragment_title);

    nickNameText = (TextView) view.findViewById(R.id.individual_nickname_tv);
    levelText = (TextView) view.findViewById(R.id.individual_level_tv);
    locationText = (TextView) view.findViewById(R.id.individual_location_tv);
    view.findViewById(R.id.individual_message).setonClickListener(this);

    imageView = (ImageView) view.findViewById(R.id.avatar_image);
    imageView.setonClickListener(this);

    Context context = getActivity();

    // 注销按钮
    logoutBtn = new ImageButton(context);
    logoutBtn.setId(ID_logoUT_BTN);
    logoutBtn.setimageResource(R.drawable.ic_logout);
    logoutBtn.setBackgroundResource(R.drawable.button_focused);
    logoutBtn.setonClickListener(this);

    RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(
            UIUtil.dip2px(context,40),LayoutParams.MATCH_PARENT);
    lp2.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    lp2.addRule(RelativeLayout.CENTER_VERTICAL);
    addViewInTitleBar(logoutBtn,lp2);

    listview = (RoundListView) view
            .findViewById(R.id.individual_center_listview);
    listview.setonItemClickListener(this);

    items = new ArrayList<SettingItem>();
    items.add(new SettingItem(POSITION_RANK,context.getResources()
            .getDrawable(R.drawable.ic_rank_black),getResources().getString(R.string.myIntegralFragment_title)));
    items.add(new SettingItem(POSITION_BALANCE,context.getResources()
            .getDrawable(R.drawable.ic_balance_black),getResources().getString(R.string.aboutus)));
    items.add(new SettingItem(POSITION_TASK,context.getResources()
            .getDrawable(R.drawable.ic_task_black),getResources().getString(R.string.myTaskFragment_title)));

    items.add(new SettingItem(POSITION_TASK,context.getResources()
            .getDrawable(R.drawable.ic_message),getResources().getString(R.string.myMessageFragment_title)));

    mAdapter = new SettingAdapter(items);
    listview.setAdapter(mAdapter);

    // 先读取缓存的数据,然后再更新
    UserInfo userInfo = UserManager.getInstance().getUserInfo();
    DebugLog.i(TAG,"Cached UserInfo = " + userInfo);

    attachUserInfo2View(userInfo);
}
项目:Newton_for_Android_AS    文件ConfirmWithCloseButtonDialog.java   
public ConfirmWithCloseButtonDialog(final Activity activity) {
    super(activity);

    RelativeLayout parentLayout = new RelativeLayout(activity);
    parentLayout.setBackgroundColor(Color.TRANSPARENT);

    setContentView(parentLayout,lpmw);

    float r = 10;
    float[] outerR = new float[] { r,r,r };
    RoundRectShape rr = new RoundRectShape(outerR,null);
    ShapeDrawable drawable = new ShapeDrawable(rr);
    drawable.getPaint().setColor(Color.WHITE);

    layout = new LinearLayout(activity);
    layout.setorientation(LinearLayout.VERTICAL);
    layout.setGravity(Gravity.CENTER);
    layout.setBackgroundDrawable(drawable);

    RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
    lp1.topMargin = UIUtil.dip2px(activity,10);
    lp1.rightMargin = UIUtil.dip2px(activity,10);
    parentLayout.addView(layout,lp1);

    //关闭按钮
    ImageButton closeBtn = new ImageButton(activity);
    closeBtn.setBackgroundResource(R.drawable.emotionstore_progresscancelbtn);
    closeBtn.setonClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            dismiss();
        }
    });

    RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
    lp2.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    parentLayout.addView(closeBtn,lp2);

    setDim(0.5f);

    // 设置为屏幕宽度
    setwindowWidth(Environment.getInstance().getScreenWidth());
}
项目:MATSOL-Android    文件MatrixdisplayActivity.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    target = R.id.matrix_button;

    int currentIndex;
    TableRow tableRow;
    // Define the layout. 
    setContentView(R.layout.matrix_display_view);

    // Parse the values from the parent 
    Intent intent = getIntent();
    this.height = intent.getIntExtra(MatrixInputActivity.MATRIX_SIZE,5);
    this.matrix = new float[this.height][];
    for(int i=0;i<this.height;i++){
        this.matrix[i] = intent.getFloatArrayExtra(
                MatrixInputActivity.MATRIX_VALUES+i);
    }
    this.results = intent.getFloatArrayExtra(
            MatrixInputActivity.MATRIX_RESULTS);
    // the we are always a linear equation 
    this.width = this.height + 1;

    // initialize the array
    this.textViewArray = new TextView[this.width*this.height];

    // get the table view to draw in it
    matrixTable = (TableLayout)findViewById(R.id.matrix_display_table);

    // traverse rows
    for(int i=0;i<this.height;i++){
        //traverse each element of the row
        tableRow = new TableRow(this);
        for(int j=0;j<this.width;j++){
            currentIndex = i*this.width + j; // this points to the location of t                                                                      // editText in the matrix
            this.textViewArray[currentIndex] = new TextView(this);
            this.textViewArray[currentIndex].setLayoutParams(
                    new LayoutParams(
                        LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)
                    );
            this.textViewArray[currentIndex].setPadding(5,5);
            if(j==this.width-1){
                this.textViewArray[currentIndex].setText(" " + this.results[i]);
            }else{
                this.textViewArray[currentIndex].setText(" " + this.matrix[i][j]);
            }
            tableRow.addView(this.textViewArray[currentIndex]);
        }
        textViewArray[0].measure(MeasureSpec.UNSPECIFIED,MeasureSpec.UNSPECIFIED);
        // this will add target and position-specific views to hint the
        // user of what we are doing
        tableRow = decorateTableRow(tableRow,textViewArray[0].getMeasuredHeight(),textViewArray[0].getMeasuredWidth(),i);


        matrixTable.addView(tableRow,new TableLayout.LayoutParams(
                    LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));

    }

}
项目:MATSOL-Android    文件MatrixdisplayActivity.java   
private TableRow decorateTableRow(TableRow tableRow,int height,int width,int row){
    ImageView leftimageView = new ImageView(this);
    ImageView rightimageView = new ImageView(this); 
    leftimageView.setBackgroundResource(R.drawable.left_edge);
    rightimageView.setBackgroundResource(R.drawable.right_edge);
    if(target==R.id.matrix_button){
        // we need to allocate two more elements
        ImageView insideLeftimageView = new ImageView(this);
        ImageView insideRightimageView = new ImageView(this);
        if(row==0){ // should change decorators for top decorators
            leftimageView.setBackgroundResource(
                    R.drawable.top_left_edge);
            rightimageView.setBackgroundResource(
                    R.drawable.top_right_edge);
            insideLeftimageView.setBackgroundResource(
                    R.drawable.top_right_edge); // this is not a mistake
            insideRightimageView.setBackgroundResource(
                    R.drawable.top_left_edge);
        }else if(row == this.height-1){
            leftimageView.setBackgroundResource(
                    R.drawable.bottom_left_edge);
            rightimageView.setBackgroundResource(
                    R.drawable.bottom_right_edge);
            insideLeftimageView.setBackgroundResource(
                    R.drawable.bottom_right_edge); // this is not a mistake
            insideRightimageView.setBackgroundResource(
                    R.drawable.bottom_left_edge);

        }else{
            insideRightimageView.setBackgroundResource(
                    R.drawable.left_edge);
            insideLeftimageView.setBackgroundResource(
                    R.drawable.right_edge);
        }
        insideLeftimageView.setLayoutParams(new LayoutParams(
                    height,width/5));
        insideRightimageView.setLayoutParams(new LayoutParams(
                    height,width/5));
        insideRightimageView.getLayoutParams().height = height;
        insideLeftimageView.getLayoutParams().height = height;
        insideRightimageView.getLayoutParams().width = width/5;
        insideLeftimageView.getLayoutParams().width = width/5;
        tableRow.addView(insideLeftimageView,this.width-1);
        tableRow.addView(insideRightimageView,this.width);

    }else{
        // this is a determinant button
    }
    leftimageView.setLayoutParams(new LayoutParams(
                height,width/10));
    rightimageView.setLayoutParams(new LayoutParams(
                height,width/10));
    leftimageView.getLayoutParams().height = height;
    rightimageView.getLayoutParams().height = height;
    leftimageView.getLayoutParams().width = width/5;
    rightimageView.getLayoutParams().width = width/5;
    tableRow.addView(leftimageView,0);
    tableRow.addView(rightimageView);
    return tableRow;
}
项目:MATSOL-Android    文件MatrixInputActivity.java   
private TableRow decorateTableRow(TableRow tableRow,0);
    tableRow.addView(rightimageView);
    return tableRow;
}
项目:rpgpack-android    文件TableFragment.java   
/**
     * adds one column to the given row 
     * @param row
     */
    protected void addColumnToRow(final TableRow row){
        int columnIndex = row.getChildCount();
        int rowIndex = table.indexOfChild(row);
        if(rowIndex == -1){
            rowIndex = headerTable.indexOfChild(row);
            if(rowIndex == -1)         Log.d("critical","cant find row!");
        }
        View newElement = null;
        //get the needed content_type by choosing it to be the first rows type
        View firstRowView = null;
        TableRow firstRow = (TableRow) table.getChildAt(0);
        if(firstRow != null){
            firstRowView = firstRow.getChildAt(columnIndex);
        }
        if(firstRowView instanceof EditText){
            newElement = initTextField(row,jacksonTable.getEntry(columnIndex,rowIndex));
        }
        else if(firstRowView instanceof LinearLayout){
            if(((LinearLayout) firstRowView).getChildAt(0) instanceof CheckBox){
                newElement = initCheckBox(row,rowIndex));
            }
            else{// if(((LinearLayout) firstRowView).getChildAt(0) instanceof TextView){
                newElement = initPopup(row,rowIndex),columnIndex,rowIndex);
            }
        }
        else{
            //firstRowView should be null Now -> its a new column
            // Could also be the first row inserted after an empty table
            // quick temp fix
            if(row == headerTable.getChildAt(0)) {
//              Log.d("row==headerTable","col:"+columnIndex+ " row:"+rowIndex);
                newElement = initTextField(row,jacksonTable.getColumnHeader(columnIndex),false);
                Log.d("TableFragment","setting onclicklistener");
                newElement.setonClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View arg0) {
                        showDialog();
                    }
                });
            }
            else {
//              Log.d("row==ChildTable",true);
            }
        }
        row.addView(newElement);
        int width = getNeededWidth(columnIndex);
        int height = getNeededHeight(rowIndex,row);
//      int oldWidth = oneColumn.getMeasuredWidth();
//      int oldHeight = oneColumn.getMeasuredWidth();
        final LayoutParams lparams = new LayoutParams(width,height);
        newElement.setLayoutParams(lparams);
        // moved to initEditText
//        if (headerTable.indexOfChild(row) != -1) {
            //setHeaderTableStyle((EditText) newElement);
//          if(((EditText)newElement).getText().toString().isEmpty()) {
//              ((EditText) newElement)
//                      .setText(getResources().getString(R.string.headline)
//                              + " "
//                              + (((TableRow) headerTable.getChildAt(0))
//                                      .getChildCount()));
//          }
//      } else {
//          setTableStyle(newElement);
//      }

    }

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...