Android 앱에서 작업하고 있습니다. 앱 제목은 광고 제목, 광고 설명 및 광고 이미지 경로 (이미지 경로)와 같은 일부 광고 정보를 취하여 광고를 게시하는 것입니다. 많은 수 있습니다).하나의 항목으로 여러 이미지 경로를 영역 데이터베이스에 문자열로 저장
이 작업에는 영역 데이터베이스가 사용됩니다. 나는이 정보를 데이터베이스에 저장할 때 어려움을 겪고있다. 하나의 광고 항목으로 여러 이미지 경로를 저장하려면 어떻게해야합니까?
내 필드는 다음과 같습니다
Ad Title
Ad Description
Ad Image Path (Multi)
이것은
public class FacebookAds extends RealmObject {
@PrimaryKey
@Index
private int id;
private String title;
private String tags;
private String description;
private String imageName; // How to use this for multiple image Path
public FacebookAds() {
}
public String getImageName() {
return imageName;
}
public void setImageName(String imageName) {
this.imageName = imageName;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
This is my Ad new Title Dialog
굉장! Repo 때문에 투표 할 수는 없지만 당신을 위해 축복을합니다 :-) –
그리고 태그에 관해서는 나중에이 태그를 검색 목적으로 사용합니까? –
@ YasirAmeen 예, 태그에도 동일한 * 인코딩 * 메커니즘을 적용 할 수 있습니다. –