Comments (4)
When I reload the RecyclerView.Adapter
some pics are ok and then another pic is cut off. Reloading again the pic that was cut off is now ok and another pic is cut off.
Maybe it has to do with how I load the ChatMessageView. Here´s my xml
<me.himanshusoni.chatmessageview.ChatMessageView
android:id="@+id/chatMessageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
app:cmv_arrowGravity="center"
app:cmv_arrowPosition="right"
app:cmv_backgroundColor="?AppTheme.ChatBubbleBackGroundColor"
app:cmv_backgroundColorPressed="?AppTheme.ChatBubbleBackGroundColorPressed"
app:cmv_cornerRadius="10dp"
app:cmv_showArrow="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/guideline1"
android:layout_marginEnd="1dp"
android:layout_marginRight="1dp">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?AppTheme.ChatBubbleBackGroundColor"/>
</FrameLayout>
from chatmessageview.
I know why this happens it´s because of this How do I make RecyclerView update its layout?
posted at: StackOverflow
Here my Picasso is asyncronical loading images into ChatMessageView but ChatMessageView is not adjusting it´s layout to accommodate the image.
@Override
public void bind(final AddressChatMessage chatMessage) {
if (chatMessage.isTypeImage()) {
thumbnailView.setVisibility(View.INVISIBLE);
timestampView.setReferenceTime(chatMessage.getTime());
if (SettingsManager.debugLog())
Picasso.with(context).setIndicatorsEnabled(true);
Picasso.with(context)
.load(chatMessage.getDownloadUri())
//.networkPolicy(NetworkPolicy.OFFLINE)
.error(R.drawable.user_placeholder_error)
.placeholder(R.drawable.user_placeholder)
.into(myImage, new Callback() {
@Override
public void onSuccess() {
}
@Override
public void onError() {
}
});
String photoUrl = UserManager.getInstance().getUser(FirebaseManager.getInstance().getCurrentUser().getUid()).getPhotoUrl();
if (!TextUtils.isEmpty(photoUrl)) {
Picasso.with(context)
.load(photoUrl)
.transform(new CircleTransformation())
.into(thumbnailView);
thumbnailView.setVisibility(View.VISIBLE);
}
}
}
from chatmessageview.
@erikswed please check in version 1.0.7
from chatmessageview.
wow that fixed my issue. I was now using the chatAdapter.notifyItemChanged(getAdapterPosition());
to update but dont need that i think. Thanks
from chatmessageview.
Related Issues (20)
- RelativeLayout End/Start crashes on API < 17 HOT 4
- Text in bubble is not displaying properly on older APIs HOT 6
- ChatMessageView with no content padding not rounding borders
- ChatMessageView does not allow parent view to catch onclick event
- OnItemClickListener does not working HOT 3
- arrowPosition : bottom & arrowGravity : end, not working properly HOT 5
- .setBackgroundColors gives an error when I give it a valid color HOT 2
- Emoji are transparent
- app is crashin on 4.1.1 HOT 2
- Show/Hide the arrow Programatically HOT 2
- setArrowPosition does not change arrow position at all HOT 2
- Strange artefakt error 2.0
- Little bottom bevels
- not showing arrow in long text HOT 7
- How to change background color on the bubble in java code? HOT 1
- wrap_content doesn't work?
- click lisner not working . Why??? can anyone help me??
- v1.0.7 app:cmv_arrowPosition="right" not works for ChatMessageView
- Custom chat bubble
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatmessageview.