Skip to content

Commit

Permalink
Merge pull request #808 from gerhardol/feature/froyo-split-prepare
Browse files Browse the repository at this point in the history
Feature/froyo split prepare
  • Loading branch information
gerhardol authored Jul 16, 2019
2 parents 4f65e63 + a4f13d5 commit b55d01b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 32 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ android {
// The packageId (in the manifest) is never changed
applicationIdSuffix ".debug"
resValue "string", "applicationIdFull", "org.runnerup${applicationIdSuffix}"
versionNameSuffix '-debug'
}
release {
minifyEnabled true
Expand Down
12 changes: 6 additions & 6 deletions app/src/org/runnerup/view/AccountListActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ public void bindView(View view, Context context, Cursor cursor) {

view.setTag(synchronizer);

TextView sectionTitle = view.findViewById(R.id.section_title);
ImageView accountIcon = view.findViewById(R.id.account_list_icon);
TextView accountIconText = view.findViewById(R.id.account_list_icon_text);
TextView accountNameText = view.findViewById(R.id.account_list_name);
SwitchCompat accountUploadBox = view.findViewById(R.id.account_list_upload);
SwitchCompat accountFeedBox = view.findViewById(R.id.account_list_feed);
TextView sectionTitle = (TextView)view.findViewById(R.id.section_title);
ImageView accountIcon = (ImageView)view.findViewById(R.id.account_list_icon);
TextView accountIconText = (TextView)view.findViewById(R.id.account_list_icon_text);
TextView accountNameText = (TextView)view.findViewById(R.id.account_list_name);
SwitchCompat accountUploadBox = (SwitchCompat)view.findViewById(R.id.account_list_upload);
SwitchCompat accountFeedBox = (SwitchCompat)view.findViewById(R.id.account_list_feed);

// category name
int curPosition = cursor.getPosition();
Expand Down
20 changes: 10 additions & 10 deletions app/src/org/runnerup/view/FeedActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,23 @@ public View getView(int arg0, View arg1, ViewGroup parent) {
if (FeedList.isHeaderDate(tmp)) {

View v = layoutInflator.inflate(R.layout.feed_row_date_header, parent, false);
TextView tv = v.findViewById(R.id.feed_date_header);
TextView tv = (TextView)v.findViewById(R.id.feed_date_header);
DateFormat a = android.text.format.DateFormat.getLongDateFormat(context);
tv.setText(a.format(tmp.getAsLong(DB.FEED.START_TIME)));
return v;

} else if (FeedList.isActivity(tmp)) {

View v = layoutInflator.inflate(R.layout.feed_row_activity, parent, false);
final ImageView ivAvatar = v.findViewById(R.id.feed_avatar);
ImageView ivSport = v.findViewById(R.id.feed_sport_emblem);
TextView tvPerson = v.findViewById(R.id.feed_person);
TextView tvSource = v.findViewById(R.id.feed_source);
TextView tvSport = v.findViewById(R.id.feed_sport);
TextView tvDistance = v.findViewById(R.id.feed_distance);
TextView tvDuration = v.findViewById(R.id.feed_duration);
TextView tvPace = v.findViewById(R.id.feed_pace);
TextView tvNotes = v.findViewById(R.id.feed_notes);
final ImageView ivAvatar = (ImageView)v.findViewById(R.id.feed_avatar);
ImageView ivSport = (ImageView)v.findViewById(R.id.feed_sport_emblem);
TextView tvPerson = (TextView)v.findViewById(R.id.feed_person);
TextView tvSource = (TextView)v.findViewById(R.id.feed_source);
TextView tvSport = (TextView)v.findViewById(R.id.feed_sport);
TextView tvDistance = (TextView)v.findViewById(R.id.feed_distance);
TextView tvDuration = (TextView)v.findViewById(R.id.feed_duration);
TextView tvPace = (TextView)v.findViewById(R.id.feed_pace);
TextView tvNotes = (TextView)v.findViewById(R.id.feed_notes);

// avatar
if (tmp.containsKey(DB.FEED.USER_IMAGE_URL)) {
Expand Down
14 changes: 7 additions & 7 deletions app/src/org/runnerup/view/HistoryActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void bindView(View view, Context context, Cursor cursor) {
Calendar cal = Calendar.getInstance();
cal.setTime(curDate);

TextView sectionTitle = view.findViewById(R.id.section_title);
TextView sectionTitle = (TextView)view.findViewById(R.id.section_title);
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
if (sameMonthAsPrevious(year, month, cursor)) {
Expand All @@ -183,12 +183,12 @@ public void bindView(View view, Context context, Cursor cursor) {
sectionTitle.setText(formatter.formatMonth(curDate));
}

TextView dateText = view.findViewById(R.id.history_list_date);
TextView dateText = (TextView)view.findViewById(R.id.history_list_date);
dateText.setText(formatter.formatDateTime(ae.getStartTime()));

// distance
Double d = ae.getDistance();
TextView distanceText = view.findViewById(R.id.history_list_distance);
TextView distanceText = (TextView)view.findViewById(R.id.history_list_distance);
if (d != null) {
distanceText.setText(formatter.formatDistance(Formatter.Format.TXT_SHORT, d.longValue()));
} else {
Expand All @@ -197,8 +197,8 @@ public void bindView(View view, Context context, Cursor cursor) {

// sport + additional info
Integer s = ae.getSport();
ImageView emblem = view.findViewById(R.id.history_list_emblem);
TextView additionalInfo = view.findViewById(R.id.history_list_additional);
ImageView emblem = (ImageView)view.findViewById(R.id.history_list_emblem);
TextView additionalInfo = (TextView)view.findViewById(R.id.history_list_additional);

int sportColor = getResources().getColor(Sport.colorOf(s));
Drawable sportDrawable = ContextCompat.getDrawable(context, Sport.drawableColored16Of(s));
Expand All @@ -214,15 +214,15 @@ public void bindView(View view, Context context, Cursor cursor) {

// duration
Long dur = ae.getTime();
TextView durationText = view.findViewById(R.id.history_list_duration);
TextView durationText = (TextView)view.findViewById(R.id.history_list_duration);
if (dur != null) {
durationText.setText(formatter.formatElapsedTime(Formatter.Format.TXT_SHORT, dur));
} else {
durationText.setText("");
}

// pace
TextView paceText = view.findViewById(R.id.history_list_pace);
TextView paceText = (TextView)view.findViewById(R.id.history_list_pace);
if (d != null && dur != null && dur != 0) {
paceText.setText(formatter.formatPaceSpeed(Formatter.Format.TXT_LONG, d / dur));
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/src/org/runnerup/view/ManageWorkoutsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ public View getGroupView(int groupPosition, boolean isExpanded,
convertView = inflater.inflate(R.layout.manage_workouts_list_category, parent, false);
}

TextView categoryText = convertView.findViewById(R.id.category_text);
TextView categoryText = (TextView)convertView.findViewById(R.id.category_text);
categoryText.setText(getProvider(groupPosition));

if (isExpanded)
Expand Down
8 changes: 4 additions & 4 deletions app/src/org/runnerup/view/StepButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public StepButton(Context context, AttributeSet attrs) {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.step_button, this);
formatter = new Formatter(context);
mLayout = findViewById(R.id.step_button);
mIntensityIcon = findViewById(R.id.step_icon);
mDurationValue = findViewById(R.id.step_duration_value);
mGoalValue = findViewById(R.id.step_goal_value);
mLayout = (ViewGroup)findViewById(R.id.step_button);
mIntensityIcon = (ImageView)findViewById(R.id.step_icon);
mDurationValue = (TextView)findViewById(R.id.step_duration_value);
mGoalValue = (TextView)findViewById(R.id.step_goal_value);
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions app/src/org/runnerup/widget/TitleSpinner.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public TitleSpinner(Context context, AttributeSet attrs) {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.title_spinner, this);

mLayout = findViewById(R.id.title_spinner);
mLabel = findViewById(R.id.title);
mValue = findViewById(R.id.value);
mSpinner = findViewById(R.id.spinner);
mLayout = (LinearLayout)findViewById(R.id.title_spinner);
mLabel = (TextView)findViewById(R.id.title);
mValue = (TextView)findViewById(R.id.value);
mSpinner = (Spinner)findViewById(R.id.spinner);

mPresenter = new SpinnerPresenter(context, attrs, this);
}
Expand Down

0 comments on commit b55d01b

Please sign in to comment.