这段代码中的BuildConfig.FLAVOR是什么意思

时间:2019-05-15 22:19:14

标签: java

我需要有关BuildConfig.FLAVOR的帮助

private void createWord(int length) {
    LinearLayout world_layout = (LinearLayout) 
    findViewById(R.id.world_layout);
    LayoutParams param = new LayoutParams(-2, -2, (float) length);
    this.word_btn = new Button[length];
    for (int i = 0; i < length; i++) {
        this.word_btn[i] = new Button(getApplicationContext());
        this.word_btn[i].setText(BuildConfig.FLAVOR);
        this.word_btn[i].setId(i);
        this.word_btn[i].setTextColor(Color.parseColor("#ffffff"));
        this.word_btn[i].setTextSize(24.0f);
        this.word_btn[i].setTypeface(Typeface.DEFAULT_BOLD);
        this.word_btn[i].setLayoutParams(param);
        this.word_btn[i].setBackgroundResource(R.drawable.matchbox);
        world_layout.addView(this.word_btn[i]);
        this.word_btn[i].setOnClickListener(charOnClick(this.word_btn[i]));
    }
}

0 个答案:

没有答案