How to modify dummy content in android master/detail activity?

前端 未结 3 702
春和景丽
春和景丽 2021-01-02 21:23

I would modify the items generated by eclipse in the master/detail schema. I can\'t find a way to do this. In particular I would take the items from an xml (res/values/array

3条回答
  •  [愿得一人]
    2021-01-02 22:20

    I had the same problem but insted of taking all the values from an array I changed

    addItem(new DummyItem("1", "Le terme"));
    addItem(new DummyItem("2", "Le cure termali"));
    addItem(new DummyItem("3", ""));
    

    I edited those addItem and then if you want to add string to your items, you have to edit all this part of code.

        public String id;
        public String content;
    
        public DummyItem(String id, String content) {
            this.id = id;
            this.content = content;
    

    Hope it will help you.

提交回复
热议问题