Giter VIP home page Giter VIP logo

Comments (5)

simonsmiley64 avatar simonsmiley64 commented on July 19, 2024

Hi ahsengrw,

We are currently in the final stages of releasing an update to the Android code. This will bring the structure of the code in-line with the iOS code structure, we will also be adding some functionality. One additional piece of functionality will be names included in the chat screen.

If you want to implement this functionality yourself then I would recommend the following:

  • Open the chat_sdk_row_text_message_friend.xml

screen shot 2017-02-01 at 14 40 29

You can see the current layout of the text cell. If you increase the size of the cell you can add a textView at the top to contain the user's name.

  • Look at the ChatSDKMessagesListAdapter
    You can see that when we inflate the row we set the text content or image of the cell we are displaying. You would need to do a similar thing for your new name label.

You can then access the user who sent the message as this is a characteristic of the message object so you could then retrieve and add their name.

Simon

from chat-sdk-android.

ahsengrw avatar ahsengrw commented on July 19, 2024

I already did this but failed to get name with extends BaseAdapeter activity (getNetworkAdapter().currentUserName().getMetaUser() cannot resolved in BaseAdapeter) . When I extends ChatSdkBaseActivity it works but notifydatasetchanged cannot resolved.

from chat-sdk-android.

kykrueger avatar kykrueger commented on July 19, 2024

Hello,

Notify data set changed should not be getting called any more than before after implementing this change. When a new message is sent or received you should be adding the user name to the child views of the recycler upon creation. Then you will not have to worry about the data set updating.

Furthermore, the method you are calling for the user will only work for the user themselves, and may cause problems for the other labels. I would recommend using something more generic for all users in the chat.

Please note, for support with integrations and consulting we offer a priority support service. The github issues page is intended more for bugs and problems with the sdk.

If you are interested in the support please see the link above or our other services available at the chatsdk website.

-- Kyle

from chat-sdk-android.

kykrueger avatar kykrueger commented on July 19, 2024

Hello,

I am wondering if you have had any luck with this customization. I would like to close the issue if the problem is solved.

-- Kyle

from chat-sdk-android.

ahsengrw avatar ahsengrw commented on July 19, 2024

finally i solved the issue, thanks for the help!

from chat-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.