mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Added unit test for story insert. Multiple design fixes. Added Mark As Read functionality to item list views.
This commit is contained in:
parent
bcb5d78b7f
commit
c1bafcede6
9 changed files with 48 additions and 33 deletions
|
@ -1,10 +1,10 @@
|
|||
body {
|
||||
padding: 5%;
|
||||
padding: 4%;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.3em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
img {
|
||||
|
@ -14,6 +14,7 @@ img {
|
|||
|
||||
a {
|
||||
color: #405BA8;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
|
@ -21,11 +22,10 @@ a:visited {
|
|||
}
|
||||
|
||||
blockquote {
|
||||
color: #bbb;
|
||||
border-left: 5px solid #ddd;
|
||||
padding-left: 15px;
|
||||
font-style: italic;
|
||||
margin-left: 10px;
|
||||
background-color: #F0F0F0;
|
||||
border-left: 1px solid #9B9B9B;
|
||||
padding: 10px 20px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
ins {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<View
|
||||
android:id="@+id/row_item_favicon_borderbar_2"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -35,14 +35,14 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:textColor="@color/linkblue"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reading_feed_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -100,8 +100,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
android:paddingTop="10dp"
|
||||
android:visibility="gone" >
|
||||
|
||||
<View
|
||||
android:id="@+id/center_filler"
|
||||
|
@ -146,14 +147,15 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@+id/shared_by"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:columnCount="3" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:background="@drawable/divider_light" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/divider_light" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.newsblur.view.NewsblurWebview
|
||||
android:id="@+id/reading_webview"
|
||||
|
@ -166,9 +168,11 @@
|
|||
android:id="@+id/share_story_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/selector_button_background"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@drawable/selector_sharebutton_background"
|
||||
android:padding="10dp"
|
||||
style="@style/shareButton"
|
||||
android:text="@string/share_this" />
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
android:id="@+id/textSizeSlider"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_width="fill_parent"
|
||||
android:progress="15"
|
||||
android:max="30"
|
||||
android:progress="3"
|
||||
android:max="5"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
|
@ -50,7 +50,7 @@
|
|||
<string name="error_replying">There was an error replying</string>
|
||||
<string name="share" formatted="false">\"%s\" - %s (via NewsBlur)</string>
|
||||
<string name="shared_title">Share</string>
|
||||
<string name="share_this">Share this</string>
|
||||
<string name="share_this">Share this story</string>
|
||||
<string name="share_comment_hint">Comment (Optional)</string>
|
||||
<string name="shared">Story shared</string>
|
||||
<string name="error_sharing">There was an problem sharing this story.</string>
|
||||
|
|
|
@ -23,6 +23,18 @@
|
|||
<item name="android:padding">10dp</item>
|
||||
</style>
|
||||
|
||||
<style name="shareButton" parent="@android:style/Widget.Button">
|
||||
<item name="android:background">@drawable/selector_sharebutton_background</item>
|
||||
<item name="android:textColor">@color/button_text_selector</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:shadowDx">0</item>
|
||||
<item name="android:shadowDy">0</item>
|
||||
<item name="android:shadowRadius">5</item>
|
||||
<item name="android:shadowColor">#003366</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:padding">10dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="button" parent="@android:style/Widget.Button">
|
||||
<item name="android:background">@drawable/selector_button_background</item>
|
||||
|
|
|
@ -132,7 +132,7 @@ public abstract class Reading extends SherlockFragmentActivity implements OnPage
|
|||
startActivity(Intent.createChooser(intent, "Share using"));
|
||||
return true;
|
||||
case R.id.menu_textsize:
|
||||
float currentValue = getSharedPreferences(PrefConstants.PREFERENCES, 0).getFloat(PrefConstants.PREFERENCE_TEXT_SIZE, 1.0f);
|
||||
float currentValue = getSharedPreferences(PrefConstants.PREFERENCES, 0).getFloat(PrefConstants.PREFERENCE_TEXT_SIZE, 2.0f);
|
||||
TextSizeDialogFragment textSize = TextSizeDialogFragment.newInstance(currentValue);
|
||||
textSize.show(getSupportFragmentManager(), TEXT_SIZE);
|
||||
return true;
|
||||
|
@ -225,9 +225,9 @@ public abstract class Reading extends SherlockFragmentActivity implements OnPage
|
|||
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
getSharedPreferences(PrefConstants.PREFERENCES, 0).edit().putFloat(PrefConstants.PREFERENCE_TEXT_SIZE, (float) progress / 10f).commit();
|
||||
getSharedPreferences(PrefConstants.PREFERENCES, 0).edit().putFloat(PrefConstants.PREFERENCE_TEXT_SIZE, (float) progress / 2).commit();
|
||||
Intent data = new Intent(ReadingItemFragment.TEXT_SIZE_CHANGED);
|
||||
data.putExtra(ReadingItemFragment.TEXT_SIZE_VALUE, (float) progress / 10f);
|
||||
data.putExtra(ReadingItemFragment.TEXT_SIZE_VALUE, (float) progress / 2f);
|
||||
|
||||
sendBroadcast(data);
|
||||
}
|
||||
|
|
|
@ -25,10 +25,10 @@ public class Story implements Serializable {
|
|||
@SerializedName("share_user_ids")
|
||||
public String[] sharedUserIds;
|
||||
|
||||
@SerializedName("friend_user_ids")
|
||||
@SerializedName("shared_by_friends")
|
||||
public String[] friendUserIds = new String[]{};
|
||||
|
||||
@SerializedName("public_user_ids")
|
||||
@SerializedName("shared_by_public")
|
||||
public String[] publicUserIds = new String[]{};
|
||||
|
||||
@SerializedName("comment_count")
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ReadingItemFragment extends Fragment {
|
|||
setupShareButton(view);
|
||||
|
||||
if (story.sharedUserIds.length > 0 || story.commentCount > 0 ) {
|
||||
view.findViewById(R.id.reading_shared_container).setVisibility(View.VISIBLE);
|
||||
view.findViewById(R.id.reading_share_bar).setVisibility(View.VISIBLE);
|
||||
setupItemCommentsAndShares(view);
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,6 @@ public class ReadingItemFragment extends Fragment {
|
|||
setupTags(view);
|
||||
}
|
||||
|
||||
|
||||
private void setupTags(View view) {
|
||||
GridView tagContainer = (GridView) view.findViewById(R.id.reading_item_tags);
|
||||
tagContainer.setAdapter(new TagAdapter(getActivity(), getFragmentManager(), story.feedId, classifier, story.tags));
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TextSizeDialogFragment extends DialogFragment {
|
|||
this.currentValue = getArguments().getFloat(CURRENT_SIZE);
|
||||
View v = inflater.inflate(R.layout.textsize_slider_dialog, null);
|
||||
seekBar = (SeekBar) v.findViewById(R.id.textSizeSlider);
|
||||
seekBar.setProgress((int) (currentValue * 10));
|
||||
seekBar.setProgress((int) (currentValue * 2));
|
||||
|
||||
getDialog().getWindow().setFlags(WindowManager.LayoutParams.FLAG_DITHER, WindowManager.LayoutParams.FLAG_DITHER);
|
||||
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
|
Loading…
Add table
Reference in a new issue