Get inflater from Context
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LayoutInflater inflater = LayoutInflater.from(context);
Set height and width of Custom view programetically
view.setLayoutParams(new LayoutParams(width, height));
shape、gradient、stroke、corners、padding、solid
// create a layout
LinearLayout linearLayout = new LinearLayout(context);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1);
linearLayout.setLayoutParams(params);
// create a textview
TextView textview = new TextView(context);
文章標籤
全站熱搜

a4ZDGuURA1N3eK奢侈品仿牌,,保固說到做到,,誠信經營,,,男士外套,女款巴寶莉風衣,秋冬進口皮靴,想看更多的圖片精品,請加LINE的ID:【kk2023】索取,購物有保障,不滿意可退換哦。 e9JpqQ2vzRPhH