Draw custom line between two elements in TableLayout Android

前端 未结 2 1778
一整个雨季
一整个雨季 2021-02-01 11:42

I have an activity with events organised in a timeline. But it looks ugly.

\"enter

<
2条回答
  •  借酒劲吻你
    2021-02-01 11:57

    You may have to create your own custom adapter but I am using array adapter for your reference. Also giving item layout for list view, hope you will manage your code accordingly.

    list-items

    items.xml

    
    
        
    
            
    
            
        
    
        
    
    
    

    dot.xml which is a drawable

    
    
    
    
    
    

    And in acivity you can use adapter like this:

    list.setAdapter(new ArrayAdapter(this, R.layout.item, R.id.textView1, items));
    

    Hope this helped!

提交回复
热议问题