티스토리 뷰

Error ocuured

class MainActivity : AppCompatActivity() {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        val TL1 = findViewById(R.id.myTableLayout) as TableLayout;
        val TR1 = TableRow(this);
        var B1 = Button(this);
        B1.setText("Dynamic Button1");
        TR1.addView(B1);
        B1.setText("Dynamic Button2");
        TR1.addView(B1);
        TL1.addView(TR1);
    }
}

 

반응형

'SWDesk > App' 카테고리의 다른 글

Kotlin + RecyclerView 테스트 예제  (2) 2019.12.17
[BPM] BPM User Tool, Ver.1.0  (0) 2019.12.14
Kotlin + Dialog  (0) 2019.12.11
Dynamic Table Creation Test02  (0) 2019.12.11
Dynamic Table Creation Test01  (0) 2019.12.09