Merge pull request #3473 from ByteHamster/statistics-fragment

Updated statistics ui
This commit is contained in:
H. Lehmann 2019-09-30 19:07:35 +02:00 committed by GitHub
commit 15b7ec6d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 184 additions and 136 deletions

View File

@ -150,13 +150,6 @@
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value="de.danoeh.antennapod.activity.PreferenceActivity"/> android:value="de.danoeh.antennapod.activity.PreferenceActivity"/>
</activity> </activity>
<activity
android:name=".activity.StatisticsActivity"
android:label="@string/statistics_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.danoeh.antennapod.activity.PreferenceActivity"/>
</activity>
<activity <activity
android:name=".activity.ImportExportActivity" android:name=".activity.ImportExportActivity"
android:label="@string/import_export"> android:label="@string/import_export">

View File

@ -24,6 +24,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.preferences.UserPreferences;
public class AutoDownloadPreferencesFragment extends PreferenceFragmentCompat { public class AutoDownloadPreferencesFragment extends PreferenceFragmentCompat {
@ -46,6 +47,12 @@ public class AutoDownloadPreferencesFragment extends PreferenceFragmentCompat {
buildEpisodeCleanupPreference(); buildEpisodeCleanupPreference();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.auto_download_label);
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();

View File

@ -9,6 +9,7 @@ import android.text.Html;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.widget.Toast; import android.widget.Toast;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.core.preferences.GpodnetPreferences; import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
import de.danoeh.antennapod.core.service.GpodnetSyncService; import de.danoeh.antennapod.core.service.GpodnetSyncService;
import de.danoeh.antennapod.dialog.AuthenticationDialog; import de.danoeh.antennapod.dialog.AuthenticationDialog;
@ -29,6 +30,12 @@ public class GpodderPreferencesFragment extends PreferenceFragmentCompat {
setupGpodderScreen(); setupGpodderScreen();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.gpodnet_main_label);
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();

View File

@ -14,6 +14,12 @@ public class IntegrationsPreferencesFragment extends PreferenceFragmentCompat {
setupIntegrationsScreen(); setupIntegrationsScreen();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.integrations_label);
}
private void setupIntegrationsScreen() { private void setupIntegrationsScreen() {
findPreference(PREF_SCREEN_GPODDER).setOnPreferenceClickListener(preference -> { findPreference(PREF_SCREEN_GPODDER).setOnPreferenceClickListener(preference -> {
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_gpodder); ((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_gpodder);

View File

@ -1,20 +1,15 @@
package de.danoeh.antennapod.fragment.preferences; package de.danoeh.antennapod.fragment.preferences;
import android.content.ActivityNotFoundException;
import android.content.Intent; import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.preference.PreferenceFragmentCompat; import android.support.v7.preference.PreferenceFragmentCompat;
import android.util.Log;
import android.widget.Toast;
import com.bytehamster.lib.preferencesearch.SearchConfiguration; import com.bytehamster.lib.preferencesearch.SearchConfiguration;
import com.bytehamster.lib.preferencesearch.SearchPreference; import com.bytehamster.lib.preferencesearch.SearchPreference;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.AboutActivity; import de.danoeh.antennapod.activity.AboutActivity;
import de.danoeh.antennapod.activity.BugReportActivity; import de.danoeh.antennapod.activity.BugReportActivity;
import de.danoeh.antennapod.activity.PreferenceActivity; import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.activity.StatisticsActivity;
import de.danoeh.antennapod.core.util.IntentUtils; import de.danoeh.antennapod.core.util.IntentUtils;
public class MainPreferencesFragment extends PreferenceFragmentCompat { public class MainPreferencesFragment extends PreferenceFragmentCompat {
@ -38,6 +33,12 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
setupSearch(); setupSearch();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.settings_label);
}
private void setupMainScreen() { private void setupMainScreen() {
findPreference(PREF_SCREEN_USER_INTERFACE).setOnPreferenceClickListener(preference -> { findPreference(PREF_SCREEN_USER_INTERFACE).setOnPreferenceClickListener(preference -> {
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_user_interface); ((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_user_interface);
@ -68,7 +69,8 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
); );
findPreference(STATISTICS).setOnPreferenceClickListener( findPreference(STATISTICS).setOnPreferenceClickListener(
preference -> { preference -> {
startActivity(new Intent(getActivity(), StatisticsActivity.class)); getFragmentManager().beginTransaction().replace(R.id.content, new StatisticsFragment())
.addToBackStack(getString(R.string.statistics_label)).commit();
return true; return true;
} }
); );

View File

@ -30,6 +30,12 @@ public class NetworkPreferencesFragment extends PreferenceFragmentCompat {
setupNetworkScreen(); setupNetworkScreen();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.network_pref);
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();

View File

@ -8,6 +8,7 @@ import android.support.v7.preference.ListPreference;
import android.support.v7.preference.PreferenceFragmentCompat; import android.support.v7.preference.PreferenceFragmentCompat;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MediaplayerActivity; import de.danoeh.antennapod.activity.MediaplayerActivity;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil; import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil;
import de.danoeh.antennapod.dialog.VariableSpeedDialog; import de.danoeh.antennapod.dialog.VariableSpeedDialog;
@ -27,6 +28,12 @@ public class PlaybackPreferencesFragment extends PreferenceFragmentCompat {
buildSmartMarkAsPlayedPreference(); buildSmartMarkAsPlayedPreference();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.playback_pref);
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();

View File

@ -1,23 +1,27 @@
package de.danoeh.antennapod.activity; package de.danoeh.antennapod.fragment.preferences;
import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.RadioButton; import android.widget.RadioButton;
import android.widget.TextView; import android.widget.TextView;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.adapter.StatisticsListAdapter; import de.danoeh.antennapod.adapter.StatisticsListAdapter;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.Converter;
import io.reactivex.Observable; import io.reactivex.Observable;
@ -28,10 +32,8 @@ import io.reactivex.schedulers.Schedulers;
/** /**
* Displays the 'statistics' screen * Displays the 'statistics' screen
*/ */
public class StatisticsActivity extends AppCompatActivity public class StatisticsFragment extends Fragment implements AdapterView.OnItemClickListener {
implements AdapterView.OnItemClickListener { private static final String TAG = StatisticsFragment.class.getSimpleName();
private static final String TAG = StatisticsActivity.class.getSimpleName();
private static final String PREF_NAME = "StatisticsActivityPrefs"; private static final String PREF_NAME = "StatisticsActivityPrefs";
private static final String PREF_COUNT_ALL = "countAll"; private static final String PREF_COUNT_ALL = "countAll";
@ -44,54 +46,51 @@ public class StatisticsActivity extends AppCompatActivity
private SharedPreferences prefs; private SharedPreferences prefs;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayShowHomeEnabled(true); prefs = getContext().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
setContentView(R.layout.statistics_activity);
prefs = getSharedPreferences(PREF_NAME, MODE_PRIVATE);
countAll = prefs.getBoolean(PREF_COUNT_ALL, false); countAll = prefs.getBoolean(PREF_COUNT_ALL, false);
setHasOptionsMenu(true);
}
totalTimeTextView = findViewById(R.id.total_time); @Nullable
feedStatisticsList = findViewById(R.id.statistics_list); @Override
progressBar = findViewById(R.id.progressBar); public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
listAdapter = new StatisticsListAdapter(this); View root = inflater.inflate(R.layout.statistics_activity, container, false);
totalTimeTextView = root.findViewById(R.id.total_time);
feedStatisticsList = root.findViewById(R.id.statistics_list);
progressBar = root.findViewById(R.id.progressBar);
listAdapter = new StatisticsListAdapter(getContext());
listAdapter.setCountAll(countAll); listAdapter.setCountAll(countAll);
feedStatisticsList.setAdapter(listAdapter); feedStatisticsList.setAdapter(listAdapter);
feedStatisticsList.setOnItemClickListener(this); feedStatisticsList.setOnItemClickListener(this);
return root;
} }
@Override @Override
public void onResume() { public void onStart() {
super.onResume(); super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.statistics_label);
refreshStatistics(); refreshStatistics();
} }
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.statistics, menu); inflater.inflate(R.menu.statistics, menu);
return true;
} }
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) { if (item.getItemId() == R.id.statistics_mode) {
finish();
return true;
} else if (item.getItemId() == R.id.statistics_mode) {
selectStatisticsMode(); selectStatisticsMode();
return true; return true;
} else {
return super.onOptionsItemSelected(item);
} }
return super.onOptionsItemSelected(item);
} }
private void selectStatisticsMode() { private void selectStatisticsMode() {
View contentView = View.inflate(this, R.layout.statistics_mode_select_dialog, null); View contentView = View.inflate(getContext(), R.layout.statistics_mode_select_dialog, null);
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setView(contentView); builder.setView(contentView);
builder.setTitle(R.string.statistics_mode); builder.setTitle(R.string.statistics_mode);
@ -126,8 +125,8 @@ public class StatisticsActivity extends AppCompatActivity
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(result -> { .subscribe(result -> {
totalTimeTextView.setText(Converter totalTimeTextView.setText(Converter.shortLocalizedDuration(getContext(),
.shortLocalizedDuration(this, countAll ? result.totalTimeCountAll : result.totalTime)); countAll ? result.totalTimeCountAll : result.totalTime));
listAdapter.update(result.feedTime); listAdapter.update(result.feedTime);
progressBar.setVisibility(View.GONE); progressBar.setVisibility(View.GONE);
totalTimeTextView.setVisibility(View.VISIBLE); totalTimeTextView.setVisibility(View.VISIBLE);
@ -139,14 +138,13 @@ public class StatisticsActivity extends AppCompatActivity
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
DBReader.StatisticsItem stats = listAdapter.getItem(position); DBReader.StatisticsItem stats = listAdapter.getItem(position);
AlertDialog.Builder dialog = new AlertDialog.Builder(this); AlertDialog.Builder dialog = new AlertDialog.Builder(getContext());
dialog.setTitle(stats.feed.getTitle()); dialog.setTitle(stats.feed.getTitle());
dialog.setMessage(getString(R.string.statistics_details_dialog, dialog.setMessage(getString(R.string.statistics_details_dialog,
countAll ? stats.episodesStartedIncludingMarked : stats.episodesStarted, countAll ? stats.episodesStartedIncludingMarked : stats.episodesStarted,
stats.episodes, stats.episodes, Converter.shortLocalizedDuration(getContext(),
Converter.shortLocalizedDuration(this, countAll ? countAll ? stats.timePlayedCountAll : stats.timePlayed),
stats.timePlayedCountAll : stats.timePlayed), Converter.shortLocalizedDuration(getContext(), stats.time)));
Converter.shortLocalizedDuration(this, stats.time)));
dialog.setPositiveButton(android.R.string.ok, null); dialog.setPositiveButton(android.R.string.ok, null);
dialog.show(); dialog.show();
} }

View File

@ -23,6 +23,7 @@ import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.DirectoryChooserActivity; import de.danoeh.antennapod.activity.DirectoryChooserActivity;
import de.danoeh.antennapod.activity.ImportExportActivity; import de.danoeh.antennapod.activity.ImportExportActivity;
import de.danoeh.antennapod.activity.OpmlImportFromPathActivity; import de.danoeh.antennapod.activity.OpmlImportFromPathActivity;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.asynctask.DocumentFileExportWorker; import de.danoeh.antennapod.asynctask.DocumentFileExportWorker;
import de.danoeh.antennapod.asynctask.ExportWorker; import de.danoeh.antennapod.asynctask.ExportWorker;
import de.danoeh.antennapod.core.export.ExportWriter; import de.danoeh.antennapod.core.export.ExportWriter;
@ -63,6 +64,12 @@ public class StoragePreferencesFragment extends PreferenceFragmentCompat {
setupStorageScreen(); setupStorageScreen();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.storage_pref);
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();

View File

@ -11,6 +11,7 @@ import android.widget.ListView;
import android.widget.Toast; import android.widget.Toast;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.preferences.UserPreferences;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
@ -25,6 +26,12 @@ public class UserInterfacePreferencesFragment extends PreferenceFragmentCompat {
setupInterfaceScreen(); setupInterfaceScreen();
} }
@Override
public void onStart() {
super.onStart();
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.user_interface_label);
}
private void setupInterfaceScreen() { private void setupInterfaceScreen() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {

View File

@ -1,41 +1,58 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent" android:layout_width="match_parent"
android:orientation="vertical" android:layout_height="match_parent"
android:paddingTop="8dp" android:orientation="vertical">
android:paddingBottom="8dp">
<TextView <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/total_time_listened_to_podcasts" android:orientation="vertical"
android:gravity="center_horizontal"/> android:padding="16dp">
<ProgressBar <TextView
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/progressBar" android:textSize="14sp"
android:layout_gravity="center_horizontal" android:text="@string/total_time_listened_to_podcasts"
style="?android:attr/progressBarStyleLarge"/> android:gravity="center_horizontal"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/total_time" android:id="@+id/total_time"
android:gravity="center_horizontal" android:textColor="?android:attr/textColorPrimary"
android:textSize="45sp"/> android:gravity="center_horizontal"
android:textSize="28sp"
tools:text="10.0 hours"/>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/progressBar"
android:layout_gravity="center_horizontal"
style="?android:attr/progressBarStyleSmall"/>
</LinearLayout>
<View
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/dividerVertical"/>
<ListView <ListView
android:id="@+id/statistics_list" android:id="@+id/statistics_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:choiceMode="singleChoice" android:choiceMode="singleChoice"
android:clipToPadding="false" android:clipToPadding="false"
android:divider="@android:color/transparent" android:divider="@android:color/transparent"
android:dividerHeight="0dp" android:dividerHeight="0dp"
android:paddingBottom="@dimen/list_vertical_padding" android:paddingBottom="@dimen/list_vertical_padding"
android:paddingTop="@dimen/list_vertical_padding" android:paddingTop="@dimen/list_vertical_padding"
android:scrollbarStyle="outsideOverlay" /> android:scrollbarStyle="outsideOverlay"
tools:listitem="@layout/statistics_listitem"/>
</LinearLayout> </LinearLayout>

View File

@ -3,63 +3,54 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/listitem_iconwithtext_height" android:layout_height="wrap_content"
android:paddingLeft="@dimen/listitem_threeline_verticalpadding" android:paddingLeft="16dp"
android:paddingStart="@dimen/listitem_threeline_verticalpadding" android:paddingRight="16dp"
android:paddingRight="@dimen/listitem_threeline_verticalpadding" android:paddingTop="8dp"
android:paddingEnd="@dimen/listitem_threeline_verticalpadding" android:paddingBottom="8dp">
tools:background="@android:color/darker_gray">
<ImageView <ImageView
android:id="@+id/imgvCover" android:id="@+id/imgvCover"
android:contentDescription="@string/cover_label" android:contentDescription="@string/cover_label"
android:layout_width="@dimen/thumbnail_length_navlist" android:layout_width="40dp"
android:layout_height="@dimen/thumbnail_length_navlist" android:layout_height="40dp"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:cropToPadding="true" android:cropToPadding="true"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_marginTop="4dp" tools:src="@drawable/ic_antenna"
android:layout_marginBottom="4dp" tools:background="@android:color/holo_green_dark"/>
tools:src="@drawable/ic_antenna"
tools:background="@android:color/holo_green_dark"/>
<TextView <TextView
android:id="@+id/txtvTime" android:id="@+id/txtvTitle"
android:layout_width="wrap_content" android:lines="1"
android:layout_height="wrap_content" android:ellipsize="end"
android:layout_marginLeft="@dimen/list_vertical_padding" android:singleLine="true"
android:layout_marginStart="@dimen/list_vertical_padding" android:textColor="?android:attr/textColorPrimary"
android:lines="1" android:textSize="16sp"
android:textColor="?android:attr/textColorTertiary" android:layout_width="wrap_content"
android:textSize="@dimen/text_size_navdrawer" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_marginLeft="16dp"
android:layout_alignParentEnd="true" android:layout_marginStart="16dp"
android:layout_centerVertical="true" android:layout_toRightOf="@id/imgvCover"
tools:text="23" android:layout_alignTop="@id/imgvCover"
tools:background="@android:color/holo_green_dark"/> android:layout_alignWithParentIfMissing="true"
tools:text="Feed title"/>
<TextView <TextView
android:id="@+id/txtvTitle" android:id="@+id/txtvTime"
android:lines="1" android:layout_width="wrap_content"
android:ellipsize="end" android:layout_height="wrap_content"
android:singleLine="true" android:lines="1"
android:layout_centerVertical="true" android:textColor="?android:attr/textColorTertiary"
android:textColor="?android:attr/textColorPrimary" android:textSize="14sp"
android:textSize="@dimen/text_size_navdrawer" android:layout_toEndOf="@+id/imgvCover"
android:layout_width="wrap_content" android:layout_toRightOf="@+id/imgvCover"
android:layout_height="wrap_content" android:layout_marginLeft="16dp"
android:layout_marginLeft="@dimen/listitem_iconwithtext_textleftpadding" android:layout_marginStart="16dp"
android:layout_marginStart="@dimen/listitem_iconwithtext_textleftpadding" android:layout_below="@+id/txtvTitle"
android:layout_toRightOf="@id/imgvCover" tools:text="23 hours"/>
android:layout_toEndOf="@id/imgvCover"
android:layout_toLeftOf="@id/txtvTime"
android:layout_toStartOf="@id/txtvTime"
android:layout_alignWithParentIfMissing="true"
tools:text="Navigation feed item title"
tools:background="@android:color/holo_green_dark"/>
</RelativeLayout> </RelativeLayout>