If record doesnt have name - description will be put instead
This commit is contained in:
parent
fafe89040c
commit
15824993f5
1 changed files with 8 additions and 2 deletions
|
@ -81,8 +81,14 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
|
||||||
for (final AudioVideoNotesPlugin.Recording recording : notes){
|
for (final AudioVideoNotesPlugin.Recording recording : notes){
|
||||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||||
View view = inflater.inflate(R.layout.dash_note_item, null, false);
|
View view = inflater.inflate(R.layout.dash_note_item, null, false);
|
||||||
((TextView) view.findViewById(R.id.name)).setText(recording.name);
|
|
||||||
((TextView) view.findViewById(R.id.descr)).setText(recording.getDescription(getActivity()));
|
if (recording.name != null){
|
||||||
|
((TextView) view.findViewById(R.id.name)).setText(recording.name);
|
||||||
|
((TextView) view.findViewById(R.id.descr)).setText(recording.getDescription(getActivity()));
|
||||||
|
} else {
|
||||||
|
((TextView) view.findViewById(R.id.name)).setText(recording.getDescription(getActivity()));
|
||||||
|
}
|
||||||
|
|
||||||
ImageView icon = (ImageView) view.findViewById(R.id.icon);
|
ImageView icon = (ImageView) view.findViewById(R.id.icon);
|
||||||
if (recording.isAudio()){
|
if (recording.isAudio()){
|
||||||
icon.setImageResource(R.drawable.ic_type_audio);
|
icon.setImageResource(R.drawable.ic_type_audio);
|
||||||
|
|
Loading…
Reference in a new issue