diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index e1905ebb8e..e2d7494ed0 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -128,6 +128,7 @@ + diff --git a/OsmAnd/res/layout/audio_video_notes_all.xml b/OsmAnd/res/layout/audio_video_notes_all.xml new file mode 100644 index 0000000000..e244ce646b --- /dev/null +++ b/OsmAnd/res/layout/audio_video_notes_all.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml b/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml index 926b742694..704f2517c1 100644 --- a/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml +++ b/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml @@ -6,7 +6,8 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> - 3){ + if (notes.size() > 3 && !allNotes){ while (notes.size() != 3){ notes.remove(3); } @@ -95,6 +106,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment { ((TextView) view.findViewById(R.id.descr)).setText(recording.getDescription(getActivity())); } else { ((TextView) view.findViewById(R.id.name)).setText(recording.getDescription(getActivity())); + view.findViewById(R.id.descr).setVisibility(View.GONE); } ImageView icon = (ImageView) view.findViewById(R.id.icon); @@ -105,12 +117,21 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment { } else { icon.setImageResource(R.drawable.ic_type_img); } - view.findViewById(R.id.play).setOnClickListener(new View.OnClickListener() { + + View.OnClickListener playListener = new View.OnClickListener() { @Override - public void onClick(View view) { + public void onClick(View v) { plugin.playRecording(getActivity(), recording); } - }); + }; + + if (allNotes){ + view.findViewById(R.id.play).setVisibility(View.GONE); + view.setOnClickListener(playListener); + } else { + view.findViewById(R.id.play).setOnClickListener(playListener); + } + int height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 50, getResources().getDisplayMetrics()); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, height);