-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from AmirBabaei/Lito_returns
Lito returns
- Loading branch information
Showing
14 changed files
with
236 additions
and
39 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/src/main/java/com/example/schat/Chat/MediaAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.example.schat.Chat; | ||
|
||
import android.content.Context; | ||
import android.net.Uri; | ||
import android.support.annotation.NonNull; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ImageView; | ||
|
||
import com.bumptech.glide.Glide; | ||
import com.example.schat.R; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class MediaAdapter extends RecyclerView.Adapter<MediaAdapter.MediaViewHolder>{ | ||
ArrayList<String>mediaList; | ||
Context context; | ||
public MediaAdapter(Context context, ArrayList<String> mediaList){ | ||
this.context = context; | ||
this.mediaList = mediaList; | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public MediaViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { | ||
View layoutView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_media, null, false); | ||
MediaViewHolder mediaViewHolder = new MediaViewHolder(layoutView); | ||
return mediaViewHolder; | ||
} | ||
|
||
@Override | ||
public void onBindViewHolder(@NonNull MediaViewHolder mediaViewHolder, int i) { | ||
Glide.with(context).load(Uri.parse(mediaList.get(i))).into(mediaViewHolder.media); | ||
} | ||
|
||
@Override | ||
public int getItemCount() { | ||
return mediaList.size(); | ||
} | ||
|
||
|
||
public class MediaViewHolder extends RecyclerView.ViewHolder { | ||
ImageView media; | ||
|
||
public MediaViewHolder(View itemView) { | ||
super(itemView); | ||
media = itemView.findViewById(R.id.media); | ||
} | ||
} | ||
|
||
} |
6 changes: 3 additions & 3 deletions
6
...ava/com/example/schat/MessageAdapter.java → ...om/example/schat/Chat/MessageAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/com/example/schat/MessageObject.java → ...com/example/schat/Chat/MessageObject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.example.schat; | ||
package com.example.schat.Chat; | ||
|
||
public class MessageObject | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
app/src/main/java/com/example/schat/Utils/CountryToPhonePrefix.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.