A/V notes dark

This commit is contained in:
Alexey Pelykh 2015-02-02 14:17:46 +02:00
parent abadd7c34a
commit c40d408597
8 changed files with 80 additions and 65 deletions

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dashListItemHeight"
android:background="?attr/dashboard_button"
android:orientation="vertical">
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/icon"
android:layout_width="@dimen/dashNoteIconSize"
android:layout_height="@dimen/dashNoteIconSize"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:layout_marginRight="@dimen/dashFavIconMargin"
tools:src="@drawable/ic_type_audio" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/dashFavNameTextSize"
tools:text="@string/lorem_ipsum" />
<TextView
android:id="@+id/descr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:textSize="@dimen/showAllButtonTextSize"
android:textColor="?android:textColorSecondary"
tools:text="@string/lorem_ipsum" />
</LinearLayout>
<ImageButton
android:id="@+id/play"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:background="?attr/dashboard_button"
android:src="@drawable/ic_play_light"/>
</LinearLayout>
</LinearLayout>

View file

@ -22,7 +22,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/dash_download_manage"
style="@style/DashboardGeneralButton"/>
style="?attr/dashboardGeneralButtonStyle"/>
<View android:layout_width="1dp"
android:background="?attr/dashboard_divider"
android:layout_height="match_parent"/>
@ -31,7 +31,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/dash_download_new_one"
style="@style/DashboardGeneralButton"/>
style="?attr/dashboardGeneralButtonStyle"/>
</LinearLayout>
</LinearLayout>

View file

@ -35,7 +35,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/send_report"
style="@style/DashboardGeneralButton"/>
style="?attr/dashboardGeneralButtonStyle"/>
<View android:layout_width="1dp"
android:background="?attr/dashboard_divider"
android:layout_height="match_parent"/>
@ -44,7 +44,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/dismiss"
style="@style/DashboardGeneralButton"/>
style="?attr/dashboardGeneralButtonStyle"/>
</LinearLayout>
</LinearLayout>

View file

@ -58,7 +58,7 @@
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/dashboard_blue"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/showAllButtonTextSize"
tools:text="100500 km"/>

View file

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:background="?attr/dashboard_button"
android:layout_height="@dimen/dashListItemHeight">
<View android:layout_width="match_parent"
android:id="@+id/divider"
android:background="?attr/dashboard_divider"
android:layout_height="1dp"/>
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:id="@+id/icon"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:layout_marginRight="@dimen/dashFavIconMargin"
android:layout_width="@dimen/dashNoteIconSize"
android:layout_height="@dimen/dashNoteIconSize"/>
<LinearLayout android:orientation="vertical"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:layout_width="0dp"
android:layout_height="wrap_content">
<TextView android:id="@+id/name"
android:textSize="@dimen/dashFavNameTextSize"
android:lines="1"
android:ellipsize="end"
android:textColor="@color/dashboard_black"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/descr"
android:textSize="@dimen/showAllButtonTextSize"
android:lines="1"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ImageButton android:id="@+id/play"
android:src="@drawable/ic_play_light"
android:background="?attr/dashboard_button"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"/>
</LinearLayout>
</LinearLayout>

View file

@ -48,6 +48,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/remove_the_tag"
style="@style/DashboardGeneralButton"/>
style="?attr/dashboardGeneralButtonStyle"/>
</LinearLayout>

View file

@ -103,7 +103,7 @@ public class DashAudioVideoNotesActivity extends OsmandActionBarActivity {
class NotesAdapter extends ArrayAdapter<AudioVideoNotesPlugin.Recording> {
NotesAdapter(List<AudioVideoNotesPlugin.Recording> recordingList) {
super(DashAudioVideoNotesActivity.this, R.layout.dash_note_item, recordingList);
super(DashAudioVideoNotesActivity.this, R.layout.dash_audio_video_notes_item, recordingList);
}
@Override
@ -111,7 +111,7 @@ public class DashAudioVideoNotesActivity extends OsmandActionBarActivity {
LayoutInflater inflater = getLayoutInflater();
View row = convertView;
if (row == null){
row = inflater.inflate(R.layout.dash_note_item, parent, false);
row = inflater.inflate(R.layout.dash_audio_video_notes_item, parent, false);
row.findViewById(R.id.divider).setVisibility(View.GONE);
}
final AudioVideoNotesPlugin.Recording recording = getItem(position);

View file

@ -6,7 +6,6 @@ import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -14,7 +13,7 @@ import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
@ -91,7 +90,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
for (final AudioVideoNotesPlugin.Recording recording : notes){
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.dash_note_item, null, false);
View view = inflater.inflate(R.layout.dash_audio_video_notes_item, null, false);
getNoteView(recording, view, getActivity(), plugin);
view.setOnClickListener(new View.OnClickListener() {