how to display location message in chat window same like whatsapp in android programmatically?

后端 未结 3 649
有刺的猬
有刺的猬 2021-02-03 14:48

I am developing a chat application. Where user can send location same like whatsapp. (I am not talking about share live location functionality). For th

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-03 15:21

    Layout file :

    
    
    
        
    
    
            
    
            
    
            
    
                
    
                
    
            
    
        
    
    

    Use this layout file as item file of recyclerview.

    For map image :

    Use this answer : https://stackoverflow.com/a/50674957/8089770

    To get lat long and name of place :

    place.getLatLng() to get the latitude and longitude

    place.getName() to get Place name to show at bottom of map

    For chat application demo with recyclerview can go through tutorials like :

    1. https://github.com/QuickBlox/ChatMessagesAdapter-android

    2. RecyclerView for chat app

    3. https://www.dev2qa.com/android-chat-app-example-using-recyclerview/

提交回复
热议问题