Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 4 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 25, 2012
@EddieRingle Use our own icon in the ActionBar again
Signed-off-by: Eddie Ringle <eddie@eringle.net>
273c584
@EddieRingle Show issue status with an icon
Signed-off-by: Eddie Ringle <eddie@eringle.net>
f4885ba
@EddieRingle Don't show repository privacy icon until we've fully loaded
Signed-off-by: Eddie Ringle <eddie@eringle.net>
4118e69
@EddieRingle Give issue label tags a slight text shadow
Signed-off-by: Eddie Ringle <eddie@eringle.net>
3002a6f
View
16 res/layout/issue_list_item.xml
@@ -31,18 +31,23 @@
android:layout_marginRight="5dp"
android:gravity="center_horizontal"
android:orientation="vertical">
- <TextView android:id="@+id/tv_issue_number"
+ <net.idlesoft.android.apps.github.ui.widgets.OcticonView android:id="@+id/ov_issue_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="5dp"
- android:textColor="@color/light_text_color"
- android:textSize="12sp" />
+ android:textSize="8dp" />
<ImageView
android:id="@+id/iv_issue_gravatar"
android:layout_height="32dp"
android:layout_width="32dp"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
android:padding="2dp"
android:background="@drawable/gravatar_border" />
+ <TextView android:id="@+id/tv_issue_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/light_text_color"
+ android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@@ -61,7 +66,8 @@
android:ellipsize="end" />
<LinearLayout android:id="@+id/ll_issue_labels"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:layout_marginTop="5dp">
</LinearLayout>
</LinearLayout>
</LinearLayout>
View
1  res/layout/repository.xml
@@ -47,6 +47,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|left"
+ android:visibility="invisible"
android:textColor="@color/light_text_color"
android:textSize="24dp"
android:layout_marginRight="5dp" />
View
3  res/values/colors.xml
@@ -30,6 +30,9 @@
<color name="github_blue">#FF4183C4</color>
<color name="github_orange">#FFFF8811</color>
+ <color name="issue_green">#3CBF5E</color>
+ <color name="issue_red">#BF3C4A</color>
+
<!-- Text colors -->
<color name="text_color">#ff111111</color>
<color name="light_text_color">#99111111</color>
View
7 src/net/idlesoft/android/apps/github/ui/activities/BaseActivity.java
@@ -118,13 +118,6 @@ void onCreate(final Bundle icicle, final int layout)
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
-
- final OcticonView ov =
- new OcticonView(getContext())
- .setGlyphColor(Color.parseColor(getString(R.color.github_blue)))
- .setOcticon(OcticonView.IC_INVERTOCAT)
- .setGlyphSize(32.0f);
- actionBar.setLogo(ov.toDrawable());
}
protected
View
23 src/net/idlesoft/android/apps/github/ui/adapters/IssuesListAdapter.java
@@ -36,6 +36,7 @@
import net.idlesoft.android.apps.github.ui.activities.BaseActivity;
import net.idlesoft.android.apps.github.ui.fragments.ProfileFragment;
import net.idlesoft.android.apps.github.ui.widgets.GravatarView;
+import net.idlesoft.android.apps.github.ui.widgets.OcticonView;
import org.eclipse.egit.github.core.Issue;
import org.eclipse.egit.github.core.Label;
import org.eclipse.egit.github.core.client.GsonUtils;
@@ -61,6 +62,8 @@
TextView title;
public
LinearLayout labels;
+ public
+ OcticonView status;
}
public
@@ -82,6 +85,7 @@ View getView(int position, View convertView, ViewGroup parent)
holder.meta = (TextView) convertView.findViewById(R.id.tv_issue_meta);
holder.title = (TextView) convertView.findViewById(R.id.tv_issue_title);
holder.labels = (LinearLayout) convertView.findViewById(R.id.ll_issue_labels);
+ holder.status = (OcticonView) convertView.findViewById(R.id.ov_issue_status);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
@@ -104,7 +108,8 @@ View getView(int position, View convertView, ViewGroup parent)
void onClick(View v)
{
final Bundle args = new Bundle();
- args.putString(HubroidConstants.ARG_TARGET_USER, GsonUtils.toJson(issue.getUser()));
+ args.putString(HubroidConstants.ARG_TARGET_USER, GsonUtils.toJson(issue.getUser
+ ()));
getContext().startFragmentTransaction();
getContext().addFragmentToTransaction(ProfileFragment.class,
R.id.fragment_container_more, args);
@@ -132,10 +137,13 @@ void onClick(View v)
/* Set label text */
label.setText(l.getName());
/* Calculate YIQ color contrast */
- if ((((r*299)+(g*587)+(b*114))/1000) >= 128)
+ if ((((r*299)+(g*587)+(b*114))/1000) >= 128) {
label.setTextColor(Color.BLACK);
- else
+ label.getPaint().setShadowLayer(1.0f, -1, -1, Color.WHITE);
+ } else {
label.setTextColor(Color.WHITE);
+ label.getPaint().setShadowLayer(1.0f, 1, 1, Color.BLACK);
+ }
label.setTextSize(10.0f);
if (labels.indexOf(label) != labels.size() - 1)
params.setMargins(0, 0, 5, 0);
@@ -144,6 +152,15 @@ void onClick(View v)
holder.labels.addView(label);
}
+ /* Set issue status Octicon */
+ if (issue.getState().equals("open")) {
+ holder.status.setOcticon(OcticonView.IC_ISSUE_OPENED);
+ holder.status.setGlyphColor(Color.parseColor(getContext().getString(R.color.issue_green)));
+ } else {
+ holder.status.setOcticon(OcticonView.IC_ISSUE_CLOSED);
+ holder.status.setGlyphColor(Color.parseColor(getContext().getString(R.color.issue_red)));
+ }
+
return convertView;
}
}
View
1  src/net/idlesoft/android/apps/github/ui/fragments/RepositoryFragment.java
@@ -361,6 +361,7 @@ void buildUI(final Repository repository)
else
ovPrivacy.setOcticon(OcticonView.IC_PUBLIC_REPO);
}
+ ovPrivacy.setVisibility(View.VISIBLE);
}

No commit comments for this range

Something went wrong with that request. Please try again.