How To Display Images with FirebaseUI Firestore RecyclerView - android

I would like to display an image in my recycler view using FirebaseUI and Firestore. So far i can only display text. I have not been able to find a understandable solution online.
As you can see in the code below, i have been able to bind the text to eventName and eventCity text view elements.
Is there a way, perhaps using picasso, to retrieve the image URI from firebase using getDisplay_Image_URI() and bind it to the eventDisplay imageview? I have added the POJO class i am using for easier comprehnsion.
ExplorePageAdapter.java
public class ExplorePageAdapter extends FirestoreRecyclerAdapter<POJO_explore_page_item, ExplorePageAdapter.EventHolder> {
/**
* Create a new RecyclerView adapter that listens to a Firestore Query. See {#link
* FirestoreRecyclerOptions} for configuration options.
*
* #param options
*/
public ExplorePageAdapter(#NonNull FirestoreRecyclerOptions<POJO_explore_page_item> options) {
super(options);
}
#Override
protected void onBindViewHolder(#NonNull EventHolder eventHolder, int i, #NonNull POJO_explore_page_item pojo_explore_page_item) {
eventHolder.eventName.setText(pojo_explore_page_item.getName());
eventHolder.eventCity.setText(pojo_explore_page_item.getCity());
//eventHolder.eventName.setText(pojo_explore_page_item.getName());
}
#NonNull
#Override
public EventHolder onCreateViewHolder(#NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.
layout.explore_page_item, parent,false
);
return new EventHolder(v);
}
class EventHolder extends RecyclerView.ViewHolder{
TextView eventName;
TextView eventCity;
ImageView eventDisplay;
//Button bookmark;
public EventHolder(#NonNull View itemView) {
super(itemView);
eventName = itemView.findViewById(R.
id.exp_event_name);
eventCity = itemView.findViewById(R.
id.exp_event_city);
eventDisplay = itemView.findViewById(R.
id.exp_display_image);
//bookmark = itemView.findViewById(R.
// id.bookmark);
}
}
}
POJO_explore_page_item.java
private String Display_Image_URI;
private String Event_ID;
private String capacity;
private String city;
private String country;
private String deadline;
private String end;
private String start;
private String price;
private String venue;
private String id;
private String name;
public POJO_explore_page_item() {
//empty constructor needed
}
public POJO_explore_page_item(String Display_Image_URI, String Event_ID, String capacity, String city, String country, String deadline, String end, String start, String price, String venue, String id, String name) {
this.Display_Image_URI = Display_Image_URI;
this.Event_ID = Event_ID;
this.capacity = capacity;
this.city = city;
this.country = country;
this.deadline = deadline;
this.end = end;
this.start = start;
this.price = price;
this.venue = venue;
this.id = id;
this.name = name;
}
public String getDisplay_Image_URI() {
return Display_Image_URI;
}
public String getEvent_ID() {
return Event_ID;
}
public String getCapacity() {
return capacity;
}
public String getCity() {
return city;
}
public String getCountry() {
return country;
}
public String getDeadline() {
return deadline;
}
public String getEnd() {
return end;
}
public String getStart() {
return start;
}
public String getPrice() {
return price;
}
public String getVenue() {
return venue;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
}

Implement Picasso in your project :
implementation 'com.squareup.picasso:picasso:2.71828'
then in your onBindViewHolder make sure you have provided image url not firebase image storage location:
Picasso.get().load(pojo_explore_page_item.getDisplay_Image_URI()).into(holder.eventDisplay);

you can use Glide
add dependencies
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
Add this code in place of your ImageView
Glide.with(context).load(url).into(imageView);

you can load image using glide
Glide.with(your_activity_context).load(pojo_explore_page_item.getDisplay_Image_URI()).placeholder(R.mipmap.placeholder).error(R.mipmap.error).into(holder.eventDisplay);

Related

how to retrieve image url from firebase database

i am retrieving data from my database such as any data field.
i am able to get fields such as location, country and address.
what i am struggling with is getting the image url from the database in order to insert it into my picasso function.
here is my java code:
private FirebaseFirestore firebaseFirestore;
private RecyclerView FirestoreList;
private FirestoreRecyclerAdapter adapter;
FirestoreList = findViewById(R.id.recycler_view);
firebaseFirestore = FirebaseFirestore.getInstance();
Query q = firebaseFirestore.collection("Shops");
//recycle options
FirestoreRecyclerOptions<Shop> options = new FirestoreRecyclerOptions.Builder<Shop>()
.setQuery(q, Shop.class)
.build();
adapter = new FirestoreRecyclerAdapter<Shop, ShopViewHolder>(options) {
#NonNull
#Override
public ShopViewHolder onCreateViewHolder(#NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.shop_item,parent,false);
return new ShopViewHolder(view);
}
#RequiresApi(api = Build.VERSION_CODES.M)
#Override
protected void onBindViewHolder(#NonNull ShopViewHolder holder, int position, #NonNull Shop model) {
holder.list_name.setText(model.getName());
holder.list_location.setText(model.getLocation());
//here is where i should be able to get my image url from the database.
i tried doing it this way but there is always and error or incompatibility.
holder.header_img.setText(model.getShopHeaderImg());
holder.header_img.setImageURI(model.getShopHeaderImg());
//all of these give me an error, so what is the correct methodology to retrieve the image url??
}
};
FirestoreList.setHasFixedSize(true);
FirestoreList.setLayoutManager(new LinearLayoutManager(this));
FirestoreList.setAdapter(adapter);
here is where i should be getting my values:
private class ShopViewHolder extends RecyclerView.ViewHolder {
private TextView list_name;
private TextView list_location;
private ImageView header_img;
public ShopViewHolder(#NonNull View itemView) {
super(itemView);
Shop MyShop = new Shop();
String image = MyShop.getShopHeaderImg();
list_name = itemView.findViewById(R.id.list_name);
list_location = itemView.findViewById(R.id.list_location);
header_img = itemView.findViewById(R.id.header_img);
Picasso.get().load(image).into(header_img);
}
}
this is my shop class:
public class Shop {
private String name;
private String country;
private String address;
private String location;
private String ShopHeaderImg;
//private int priority;
public Shop(){
}
public Shop(String name, String country, String address, String location, String ShopHeaderImg) {
this.name = name;
this.country = country;
this.address = address;
this.location = location;
this.ShopHeaderImg = ShopHeaderImg;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getShopHeaderImg() {
return ShopHeaderImg;
}
public void setShopHeaderImg(String ShopHeaderImg) {
this.ShopHeaderImg = ShopHeaderImg;
}
}
how will i be able to retrieve the image url into the getShopHeaderImg() method
check this
put this method inside your viewHolder
public void setHeaderImage(final Context c , final String Image){
final ImageView headerImg = (ImageView)itemView.findViewById(R.id.headerImage);
Picasso.with(c).load(Image).into(headerImg);
}
and use the method inside onBindViewHolder
holder.setHeaderImage(getApplicationContext(),model.getShopHeaderImg());

what does a folder named Bean mean in Android?

I've seen an Android project structure in the image below. What does "Bean" mean in this structure? or Why does that folder name "Bean"?
Bean in java is basically a single class encapsulate many objects into a single object and there properties can be manipulated by using getter and setter method.We also call it model class. The below code snippet is an example of bean class.
public class Book implements Serializable{
private String isbn;
private String title;
private String author;
private String publisher;
private int pages;
/**
* Default constructor
*/
public Book() {
this.isbn = "";
this.title = "";
this.author = "";
this.publisher = "";
this.pages = 0;
}
public String getIsbn() {
return isbn;
}
public void setIsbn(final String isbn) {
this.isbn = isbn;
}
public String getTitle() {
return title;
}
public void setTitle(final String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(final String author) {
this.author = author;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(final String publisher) {
this.publisher = publisher;
}
public int getPages() {
return pages;
}
public void setPages(final int pages) {
this.pages = pages;
}
}
In your case i think the package you pointed contained all the bean classes

RecyclerView adapter gets string from model as a memory object

I have pretty normal recyclerview adapter. I pass the list of array to the adapter and trying set images from link as needed with Glide.
Problem is, when I try to get images link with loggin they seem normal, but when I pass data list to adapter they are not working. And giving memory object instead of String.
I should get this:
http://somelin.com/image.jpg
Instead I get this:
package.name.models.responses.chain.Logo_#c170923
What should I do? My adapter works normally as I am using this adapter in other places in the same way and it works.
My adapter
public class ChainAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private Context mContext;
private List<Restaurant> modelList;
private OnItemClickListener mItemClickListener;
public ChainAdapter(Context context, ArrayList<Restaurant> modelList) {
this.mContext = context;
this.modelList = modelList;
}
public void updateList(ArrayList<Restaurant> modelList) {
this.modelList = modelList;
notifyDataSetChanged();
}
#Override
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_chain_list, viewGroup, false);
return new ViewHolder(view);
}
#Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
//Here you can fill your row view
if (holder instanceof ViewHolder) {
final Restaurant model = getItem(position);
ViewHolder genericViewHolder = (ViewHolder) holder;
String link = "http://cdn.link.in/unsafe/" + model.getLogo();
System.out.println("chainAdapter " + link);
Glide.with(mContext).load(link).into(genericViewHolder.rest_logo);
CenteredImageSpan imagespan = new CenteredImageSpan(mContext, R.drawable.verified_account);
Spannable text = new SpannableString(model.getName() + " ");
text.setSpan(imagespan, model.getName().length(), model.getName().length() + 1, 0); //text is an object of TextView
if (model.getVerified()) {
genericViewHolder.rest_name.setText(text);
} else {
genericViewHolder.rest_name.setText(model.getName());
}
Calendar today = Calendar.getInstance();
List<Today> hours = model.getToday();
for (Today hour : hours) {
if (hour.getWeekday() == today.get(Calendar.DAY_OF_WEEK) - 1) {
genericViewHolder.restCloseNowIcon.setImageResource(R.drawable.ic_open_now);
genericViewHolder.restCloseNowText.setText(mContext.getString(R.string.open_now));
genericViewHolder.restCloseNowText.setTextColor(mContext.getResources().getColor(R.color.open_now));
} else {
genericViewHolder.restCloseNowIcon.setImageResource(R.drawable.ic_close_now);
genericViewHolder.restCloseNowText.setText(mContext.getString(R.string.close_now));
genericViewHolder.restCloseNowText.setTextColor(mContext.getResources().getColor(R.color.close_now));
}
}
int totalRatings = model.getTotalRatings();
if (totalRatings != 0)
genericViewHolder.restStars.setText((int) totalRatings + "");
}
}
#Override
public int getItemCount() {
return modelList.size();
}
public void SetOnItemClickListener(final OnItemClickListener mItemClickListener) {
this.mItemClickListener = mItemClickListener;
}
private Restaurant getItem(int position) {
return modelList.get(position);
}
public interface OnItemClickListener {
void onItemClick(View view, int position, Restaurant model);
}
public class ViewHolder extends RecyclerView.ViewHolder {
#BindView(R.id.imageView8)
ImageView rest_logo;
#BindView(R.id.textView3)
TextView rest_name;
#BindView(R.id.isVerified)
ImageView isVerified;
#BindView(R.id.rest_close_now_icon)
ImageView restCloseNowIcon;
#BindView(R.id.rest_close_now_text)
TextView restCloseNowText;
#BindView(R.id.rest_stars)
TextView restStars;
public ViewHolder(final View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
itemView.setOnClickListener(view -> mItemClickListener.onItemClick(itemView, getAdapterPosition(), modelList.get(getAdapterPosition())));
}
}
}
Model
public class Restaurant implements Parcelable
{
#SerializedName("username")
#Expose
private String username;
#SerializedName("total_ratings")
#Expose
private Integer totalRatings;
#SerializedName("verified")
#Expose
private Boolean verified;
#SerializedName("name")
#Expose
private String name;
#SerializedName("logo")
#Expose
private Logo_ logo;
#SerializedName("id")
#Expose
private Integer id;
#SerializedName("today")
#Expose
private List<Today> today = null;
#SerializedName("thumbnail")
#Expose
private Thumbnail thumbnail;
public final static Creator<Restaurant> CREATOR = new Creator<Restaurant>() {
#SuppressWarnings({
"unchecked"
})
public Restaurant createFromParcel(Parcel in) {
return new Restaurant(in);
}
public Restaurant[] newArray(int size) {
return (new Restaurant[size]);
}
}
;
protected Restaurant(Parcel in) {
this.username = ((String) in.readValue((String.class.getClassLoader())));
this.totalRatings = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.verified = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
this.name = ((String) in.readValue((String.class.getClassLoader())));
this.logo = ((Logo_) in.readValue((Logo_.class.getClassLoader())));
this.id = ((Integer) in.readValue((Integer.class.getClassLoader())));
in.readList(this.today, (Today.class.getClassLoader()));
this.thumbnail = ((Thumbnail) in.readValue((Thumbnail.class.getClassLoader())));
}
/**
* No args constructor for use in serialization
*
*/
public Restaurant() {
}
/**
*
* #param id
* #param logo
* #param username
* #param thumbnail
* #param verified
* #param name
* #param today
* #param totalRatings
*/
public Restaurant(String username, Integer totalRatings, Boolean verified, String name, Logo_ logo, Integer id, List<Today> today, Thumbnail thumbnail) {
super();
this.username = username;
this.totalRatings = totalRatings;
this.verified = verified;
this.name = name;
this.logo = logo;
this.id = id;
this.today = today;
this.thumbnail = thumbnail;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Integer getTotalRatings() {
return totalRatings;
}
public void setTotalRatings(Integer totalRatings) {
this.totalRatings = totalRatings;
}
public Boolean getVerified() {
return verified;
}
public void setVerified(Boolean verified) {
this.verified = verified;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Logo_ getLogo() {
return logo;
}
public void setLogo(Logo_ logo) {
this.logo = logo;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public List<Today> getToday() {
return today;
}
public void setToday(List<Today> today) {
this.today = today;
}
public Thumbnail getThumbnail() {
return thumbnail;
}
public void setThumbnail(Thumbnail thumbnail) {
this.thumbnail = thumbnail;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(username);
dest.writeValue(totalRatings);
dest.writeValue(verified);
dest.writeValue(name);
dest.writeValue(logo);
dest.writeValue(id);
dest.writeList(today);
dest.writeValue(thumbnail);
}
public int describeContents() {
return 0;
}
}
Model Logo_
public class Logo_ implements Parcelable {
#SerializedName("path")
#Expose
private String path;
#SerializedName("id")
#Expose
private Integer id;
#SerializedName("caption")
#Expose
private String caption;
public final static Creator<Logo_> CREATOR = new Creator<Logo_>() {
#SuppressWarnings({
"unchecked"
})
public Logo_ createFromParcel(Parcel in) {
return new Logo_(in);
}
public Logo_[] newArray(int size) {
return (new Logo_[size]);
}
}
;
protected Logo_(Parcel in) {
this.path = ((String) in.readValue((String.class.getClassLoader())));
this.id = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.caption = ((String) in.readValue((String.class.getClassLoader())));
}
/**
* No args constructor for use in serialization
*
*/
public Logo_() {
}
/**
*
* #param id
* #param path
* #param caption
*/
public Logo_(String path, Integer id, String caption) {
super();
this.path = path;
this.id = id;
this.caption = caption;
}
public String getPath() {
return this.path;
}
public void setPath(String path) {
this.path = path;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCaption() {
return caption;
}
public void setCaption(String caption) {
this.caption = caption;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(path);
dest.writeValue(id);
dest.writeValue(caption);
}
public int describeContents() {
return 0;
}
}
As you've discovered the problem is in this line:
String link = "YOUR_URL" + model.getLogo();
Your method getLogo() does not return a string to be appended here, but rather an object of type Logo_. You have 3 options:
Change the method getLogo in your model to return a String (probably the logo filename).
In the Logo object, create another method to return the name and call it like this:
String link = "YOUR_URL" + model.getLogo().getFilename();
3.Override the toString method in your Logo object to return the filename.
#Override
public String toString(){
return this.filename;
}
Edit: You can use the getPath() in your logo POJO:
String link = "YOUR_URL" + model.getLogo().getPath();

how to handle a JSON array object using retrofit?

I am not so new to Android, but started using retrofit today, I was able to clear all errors, now the response body returns null. I know its something to do with the way my class is set up. I have no idea how to handle an array with arrays. Any help would be appreciated. Thanks
[
My Interface
#GET("/web-api.php?route=feed/web_api/products")
Call<Product> loadProducts(#Query("category") Integer id, #Query("key") String apiKey);
Class
public class Product implements Serializable {
#SerializedName("id")
private long mId;
#SerializedName("name")
private String mname;
#SerializedName("description")
private String mText;
#SerializedName("price")
private Double mprice;
#SerializedName("href")
private String mproductURL;
#SerializedName("thumb")
private String mImageURL;
public Product(long mId, String mname, String mText, Double mprice, String mproductURL, String mImageURL) {
this.mId = mId;
this.mname = mname;
this.mText = mText;
this.mprice = mprice;
this.mproductURL = mproductURL;
this.mImageURL = mImageURL;
}
public long getmId() {
return mId;
}
public void setmId(long mId) {
this.mId = mId;
}
public String getMname() {
return mname;
}
public void setMname(String mname) {
this.mname = mname;
}
public String getmText() {
return mText;
}
public void setmText(String mText) {
this.mText = mText;
}
public Double getMprice() {
return mprice;
}
public void setMprice(Double mprice) {
this.mprice = mprice;
}
public String getMproductURL() {
return mproductURL;
}
public void setMproductURL(String mproductURL) {
this.mproductURL = mproductURL;
}
public String getmImageURL() {
return mImageURL;
}
public void setmImageURL(String mImageURL) {
this.mImageURL = mImageURL;
}
#Override
public String toString() {
return mText;
}
}
Just define a Super class -
public class ResponseDS{
public boolean success;
public Product[] products;
}
And use ResponseDS instead of Product class -
#GET("/web-api.php?route=feed/web_api/products")
Call<ResponseDS> loadProducts(#Query("category") Integer id, #Query("key") String apiKey);
Hope it will help :)

Sugar ORM doesnt store data

I am using Sugar ORM 1.3.1 and i am trying to save the following objects
public class Article extends SugarRecord<Article> implements Serializable {
#JsonProperty("Categories")
private List<Category> categories = new ArrayList<Category>();
#JsonProperty("Contents")
private List<Content> contents = new ArrayList<Content>();
#JsonProperty("Country")
private CountryRelated country;
#JsonProperty("Description")
private String description;
#JsonProperty("ExpiryDate")
private String expiryDate;
#JsonProperty("ExtraFields")
private List<ExtraField> extraFields = new ArrayList<ExtraField>();
#JsonProperty("Identifier")
private int identifier;
#JsonProperty("ImageURL")
private String imageURL;
#JsonProperty("Name")
private String name;
#JsonProperty("PortalID")
private int portalID;
#JsonProperty("PublishDate")
private String publishDate;
#JsonProperty("Region")
private Region region;
#JsonProperty("Related")
private List<Related> related = new ArrayList<Related>();
#JsonProperty("Newsbite")
private boolean newsbite;
#JsonProperty("ShareURL")
private String shareURL;
#JsonProperty("Tags")
private List<Tag> tags = new ArrayList<Tag>();
#JsonProperty("Type")
private int type;
public Article() {
}
public Article(List<Category> categories, List<Content> contents, List<ExtraField> extraFields, CountryRelated country, String description, String expiryDate, int identifier, String imageURL, String name, boolean newsbite, int portalID, String publishDate, Region region, List<Related> related, String shareURL, List<Tag> tags, int type) {
this.categories = categories;
this.contents = contents;
this.extraFields = extraFields;
this.country = country;
this.description = description;
this.expiryDate = expiryDate;
this.identifier = identifier;
this.imageURL = imageURL;
this.name = name;
this.newsbite = newsbite;
this.portalID = portalID;
this.publishDate = publishDate;
this.region = region;
this.related = related;
this.shareURL = shareURL;
this.tags = tags;
this.type = type;
}
public List<Category> getCategories() {
return categories;
}
public void setCategories(List<Category> categories) {
this.categories = categories;
}
public List<Content> getContents() {
return contents;
}
public void setContents(List<Content> contents) {
this.contents = contents;
}
public List<ExtraField> getExtraFields() {
return extraFields;
}
public void setExtraFields(List<ExtraField> extraFields) {
this.extraFields = extraFields;
}
public CountryRelated getCountry() {
return country;
}
public void setCountry(CountryRelated country) {
this.country = country;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getExpiryDate() {
return expiryDate;
}
public void setExpiryDate(String expiryDate) {
this.expiryDate = expiryDate;
}
public int getIdentifier() {
return identifier;
}
public void setIdentifier(int identifier) {
this.identifier = identifier;
}
public String getImageURL() {
return imageURL;
}
public void setImageURL(String imageURL) {
this.imageURL = imageURL;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isNewsbite() {
return newsbite;
}
public void setNewsbite(boolean newsbite) {
this.newsbite = newsbite;
}
public int getPortalID() {
return portalID;
}
public void setPortalID(int portalID) {
this.portalID = portalID;
}
public String getPublishDate() {
return publishDate;
}
public void setPublishDate(String publishDate) {
this.publishDate = publishDate;
}
public Region getRegion() {
return region;
}
public void setRegion(Region region) {
this.region = region;
}
public List<Related> getRelated() {
return related;
}
public void setRelated(List<Related> related) {
this.related = related;
}
public String getShareURL() {
return shareURL;
}
public void setShareURL(String shareURL) {
this.shareURL = shareURL;
}
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
}
Category.class
public class Category extends SugarRecord<Category> implements Serializable {
#JsonProperty("Identifier")
private int identifier;
#JsonProperty("Name")
private String name;
public constructor + getters and setters }
Content.class and CountryRelated.class have same structure
after i do article.save() my lists doesnt save . Am i doing something wrong or it doesnt save lists at all ???
I few things to look at.
First. I do not believe that the database will handle a column with the type of List or a type of other Object. When I tried running your code, I received:
Class cannot be read from Sqlite3 database. Please check the type of field categories(java.util.List)
These should be types the database can store. Try serializing your List(s) to Strings to insert them in the db. You can try doing this in your getter and setter. The setter takes the list of objects and converts it to a serialized String, the getter takes the serialized String and converts it back to a list of objects.
In the instance of SugarOrm, you can reference another table and it will create a relationship outlined here:
http://satyan.github.io/sugar/creation.html#why
Notice the "Author" type is just referencing a record from another table in the database.
Second I usually try and set my default values inside my default constructor. so something like:
... property declarations...
public Article() {
this.name = "Default Value";
}
Hope this helps you finish troublshooting!

Categories

Resources