Skip to content

Commit

Permalink
Lint-ify
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Ringle <eddie@eringle.net>
  • Loading branch information
EddieRingle committed Jun 16, 2012
1 parent 948e710 commit 3d27574
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 35 deletions.
2 changes: 1 addition & 1 deletion res/layout/account_select_activity.xml
Expand Up @@ -26,7 +26,7 @@
android:gravity="center"
style="@style/stdLinearLayout">
<ListView android:id="@+id/lv_userselect_users"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView android:id="@+id/tv_userselect_msg"
Expand Down
1 change: 1 addition & 0 deletions res/layout/login_activity.xml
Expand Up @@ -44,6 +44,7 @@
<EditText android:id="@+id/et_auth_field_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:password="true" />
<Button android:id="@+id/btn_auth_sign_in"
android:layout_width="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion res/layout/main.xml
Expand Up @@ -21,9 +21,9 @@
-->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@android:color/white"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:gravity="center">
<FrameLayout android:id="@+id/fragment_navigation"
android:layout_width="wrap_content"
Expand Down
7 changes: 4 additions & 3 deletions res/layout/repository_list_item.xml
Expand Up @@ -25,9 +25,10 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="10dp"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_gravity="left"
Expand All @@ -47,7 +48,7 @@
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="13.5sp"
android:text="/" />
android:text="@string/single_slash" />
<TextView android:id="@+id/tv_repository_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion res/layout/single_issue.xml
Expand Up @@ -26,7 +26,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:editable="true"
android:hint="Leave a comment" />
android:hint="@string/issue_comment_hint" />
<ImageButton android:id="@+id/ib_issue_comment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
6 changes: 5 additions & 1 deletion res/values/strings.xml
Expand Up @@ -27,6 +27,8 @@

<string name="hello">Hello from Hubroid!</string>

<string name="single_slash">/</string>

<!-- Action Bar -->
<string name="actionbar_action_add_account">New Account</string>
<string name="actionbar_action_filters">Filters</string>
Expand All @@ -51,7 +53,7 @@
<string name="auth_label_login">Login</string>
<string name="auth_label_password">Password</string>
<string name="auth_label_sign_in">Sign In to GitHub</string>
<string name="auth_message_signing_in">Signing in...</string>
<string name="auth_message_signing_in">Signing in</string>
<string name="auth_warning_blank_field">Please fill in this field</string>
<string name="auth_link_signup">
New to GitHub? &lt;a href=\"https://github.com/signup\">Get an account&lt;/a>.
Expand Down Expand Up @@ -82,6 +84,8 @@

<string name="issue_empty_description">No description given.</string>

<string name="issue_comment_hint">Leave a comment</string>

<!-- Users -->
<string name="followers">Followers</string>
<string name="following">Following</string>
Expand Down
Expand Up @@ -52,7 +52,7 @@ Boolean call() throws Exception
{
return null;
}
};
}

@Override
protected
Expand Down
Expand Up @@ -106,17 +106,4 @@ void onResume()
}
}

@Override
protected
void onActivityResult(int requestCode, int resultCode, Intent data)
{
/*
if (requestCode == 0) {
/* Account selection is done, restart
startActivity(MainActivity.class);
finish();
}
*/
super.onActivityResult(requestCode, resultCode, data);
}
}
Expand Up @@ -53,10 +53,9 @@
class FollowersFollowingFragment
extends UIFragment<FollowersFollowingFragment.FollowersFollowingDataFragment>
{
public static final int LIST_FOLLOWERS = 1;
public static final int LIST_FOLLOWING = 2;
private static final int LIST_FOLLOWERS = 1;
private static final int LIST_FOLLOWING = 2;

protected
class ListHolder
{
ArrayList<User> users;
Expand Down Expand Up @@ -88,7 +87,9 @@ int findListIndexByType(int listType)
}
}

private
ListViewPager mViewPager;
private
TitlePageIndicator mTitlePageIndicator;

public
Expand All @@ -114,7 +115,6 @@ View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInst
return v;
}

public
void fetchData(final boolean freshen)
{
if (!mDataFragment.targetUser.getLogin().equals("")) {
Expand Down
7 changes: 3 additions & 4 deletions src/net/idlesoft/android/apps/github/ui/widgets/IdleList.java
Expand Up @@ -23,7 +23,6 @@

package net.idlesoft.android.apps.github.ui.widgets;

import android.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
Expand Down Expand Up @@ -80,7 +79,7 @@ void setupIdleList()
mFooterView.setGravity(Gravity.CENTER);
mFooterView.setLayoutParams(new LayoutParams(MATCH_PARENT, WRAP_CONTENT));

mProgress = new ProgressBar(context, null, R.attr.progressBarStyle);
mProgress = new ProgressBar(context, null, android.R.attr.progressBarStyle);
mProgress.setId(INTERNAL_PROGRESS_ID);
mProgress.setIndeterminate(true);
mProgress.setVisibility(View.GONE);
Expand Down Expand Up @@ -182,14 +181,14 @@ void setListShown(boolean shown, boolean animate) {
final Context context = getContext();
if (shown) {
if (animate) {
startAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_in));
startAnimation(AnimationUtils.loadAnimation(context, android.R.anim.fade_in));
} else {
clearAnimation();
}
setVisibility(View.VISIBLE);
} else {
if (animate) {
startAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_out));
startAnimation(AnimationUtils.loadAnimation(context, android.R.anim.fade_out));
} else {
clearAnimation();
}
Expand Down
2 changes: 1 addition & 1 deletion src/net/idlesoft/android/apps/github/utils/DataTask.java
Expand Up @@ -144,4 +144,4 @@ Handler getHandler()
{
return mHandler;
}
};
}
9 changes: 4 additions & 5 deletions src/net/idlesoft/android/apps/github/utils/StringUtils.java
Expand Up @@ -33,16 +33,15 @@ class StringUtils
/**
* Get time string since a specified date
*
* @param pTime
* @param itemTime
* @return String of format "X U(s)", X is the quantity of U time units
* (e.g., "3 days")
*/
public static
String getTimeSince(final Date pTime)
String getTimeSince(final Date itemTime)
{
final Date item_time = pTime;
final Date current_time = new Date();
final long ms = current_time.getTime() - item_time.getTime();
final Date currentTime = new Date();
final long ms = currentTime.getTime() - itemTime.getTime();
final long sec = ms / 1000;
final long min = sec / 60;
final long hour = min / 60;
Expand Down

0 comments on commit 3d27574

Please sign in to comment.