| Chunk |
|---|
| Conflicting content |
|---|
import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; <<<<<<< HEAD import android.os.Environment; import android.provider.MediaStore; ======= import android.os.Parcelable; >>>>>>> 65daa01ab93ab77dab5055f08fa62cc1e2270f2d import android.support.v4.view.Menu; import android.support.v4.view.MenuItem; import android.support.v4.view.PagerAdapter; |
| Solution content |
|---|
import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.os.Parcelable; import android.provider.MediaStore; import android.support.v4.view.Menu; import android.support.v4.view.MenuItem; import android.support.v4.view.PagerAdapter; |
| File |
|---|
| BeerViewFragment.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private View scoreCard; private TextView nameText, brewernameText, noscoreyetText, scoreText, stylepctlText, ratingsText, descriptionText; private Button abvstyleButton; <<<<<<< HEAD private Button rateThisButton, drinkingThisButton, addAvailabilityButton, havethisButton, wantthisButton, uploadphotoButton; private View ownratingRow, ownratinglabel, recentratingslabel; ======= private Button rateThisButton, drinkingThisButton, addAvailabilityButton, havethisButton, wantthisButton; private View ownratingRow, ownratinglabel, otherratingslabel; >>>>>>> 65daa01ab93ab77dab5055f08fa62cc1e2270f2d private TextView ownratingTotal, ownratingAroma, ownratingAppearance, ownratingTaste, ownratingPalate, ownratingOverall, ownratingUsername, ownratingComments; private ListView availabilityView; |
| Solution content |
|---|
private View scoreCard; private TextView nameText, brewernameText, noscoreyetText, scoreText, stylepctlText, ratingsText, descriptionText; private Button abvstyleButton; private Button rateThisButton, drinkingThisButton, addAvailabilityButton, havethisButton, wantthisButton, uploadphotoButton; private View ownratingRow, ownratinglabel, otherratingslabel; private TextView ownratingTotal, ownratingAroma, ownratingAppearance, ownratingTaste, ownratingPalate, ownratingOverall, ownratingUsername, ownratingComments; private ListView availabilityView; |
| File |
|---|
| BeerViewFragment.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
getRateBeerActivity().load(new UserViewFragment(username, userId));
}
<<<<<<< HEAD
protected void onStartPhotoUpload() {
// Start an intent to snap a picture
// http://stackoverflow.com/questions/1910608/android-action-image-capture-intent
try {
if (Environment.getExternalStorageDirectory().equals(Environment.MEDIA_MOUNTED)) {
File file = new File(RateBeerForAndroid.DEFAULT_FILES_DIR + "/photos/" + Integer.toString(beerId) + ".jpg");
if (!file.exists()) {
file.getParentFile().mkdirs();
file.createNewFile();
}
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
startActivityForResult(i, ACTIVITY_CAMERA);
} else {
publishException(null, getString(R.string.error_nocamera));
}
} catch (Exception e) {
publishException(null, getString(R.string.error_nocamera));
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case ACTIVITY_CAMERA:
Uri photo = data.getData();
// Start an upload task for this photo
Intent i = new Intent(PosterService.ACTION_UPLOADBEERPHOTO);
i.putExtra(PosterService.EXTRA_BEERID, beerId);
i.putExtra(PosterService.EXTRA_BEERNAME, beerName);
i.putExtra(PosterService.EXTRA_PHOTO, photo.toString());
getActivity().startService(i);
break;
}
=======
private void onPlaceClick(Integer placeId, String placeName) {
// Start the user details screen
getRateBeerActivity().load(new PlaceViewFragment(placeId));
>>>>>>> 65daa01ab93ab77dab5055f08fa62cc1e2270f2d
}
@Override |
| Solution content |
|---|
getRateBeerActivity().load(new UserViewFragment(username, userId));
}
protected void onStartPhotoUpload() {
// Start an intent to snap a picture
// http://stackoverflow.com/questions/1910608/android-action-image-capture-intent
try {
if (Environment.getExternalStorageDirectory().equals(Environment.MEDIA_MOUNTED)) {
File file = new File(RateBeerForAndroid.DEFAULT_FILES_DIR + "/photos/" + Integer.toString(beerId) + ".jpg");
if (!file.exists()) {
file.getParentFile().mkdirs();
file.createNewFile();
}
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
startActivityForResult(i, ACTIVITY_CAMERA);
} else {
publishException(null, getString(R.string.error_nocamera));
}
} catch (Exception e) {
publishException(null, getString(R.string.error_nocamera));
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case ACTIVITY_CAMERA:
Uri photo = data.getData();
// Start an upload task for this photo
Intent i = new Intent(PosterService.ACTION_UPLOADBEERPHOTO);
i.putExtra(PosterService.EXTRA_BEERID, beerId);
i.putExtra(PosterService.EXTRA_BEERNAME, beerName);
i.putExtra(PosterService.EXTRA_PHOTO, photo.toString());
getActivity().startService(i);
break;
}
}
private void onPlaceClick(Integer placeId, String placeName) {
// Start the user details screen
getRateBeerActivity().load(new PlaceViewFragment(placeId));
}
@Override |
| File |
|---|
| BeerViewFragment.java |
| Developer's decision |
|---|
| Concatenation |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Switch statement |
| Chunk |
|---|
| Conflicting content |
|---|
TextView total, aroma, appearance, taste, palate, overall, username, comments;
}
<<<<<<< HEAD
public void initFields(View fields) {
imageView = (ImageView) fields.findViewById(R.id.image);
abvstyleButton = (Button) fields.findViewById(R.id.abvstyle);
descriptionText = (TextView) fields.findViewById(R.id.description);
nameText = (TextView) fields.findViewById(R.id.name);
brewernameText = (TextView) fields.findViewById(R.id.brewername);
scoreCard = fields.findViewById(R.id.scorecard);
noscoreyetText = (TextView) fields.findViewById(R.id.noscoreyet);
scoreText = (TextView) fields.findViewById(R.id.overallpctl);
stylepctlText = (TextView) fields.findViewById(R.id.stylepctl);
ratingsText = (TextView) fields.findViewById(R.id.ratings);
buttonsbarView = (LinearLayout) fields.findViewById(R.id.buttonsbar);
rateThisButton = (Button) fields.findViewById(R.id.ratethis);
drinkingThisButton = (Button) fields.findViewById(R.id.drinkingthis);
addAvailabilityButton = (Button) fields.findViewById(R.id.addavailability);
buttonsbar2View = (LinearLayout) fields.findViewById(R.id.buttonsbar2);
havethisButton = (Button) fields.findViewById(R.id.havethis);
wantthisButton = (Button) fields.findViewById(R.id.wantthis);
uploadphotoButton = (Button) fields.findViewById(R.id.uploadphoto);
ownratinglabel = fields.findViewById(R.id.ownratinglabel);
ownratingRow = fields.findViewById(R.id.ownrating);
ownratingTotal = (TextView) fields.findViewById(R.id.total);
ownratingAroma = (TextView) fields.findViewById(R.id.aroma);
ownratingAppearance = (TextView) fields.findViewById(R.id.appearance);
ownratingTaste = (TextView) fields.findViewById(R.id.taste);
ownratingPalate = (TextView) fields.findViewById(R.id.palate);
ownratingOverall = (TextView) fields.findViewById(R.id.overall);
ownratingUsername = (TextView) fields.findViewById(R.id.username);
ownratingComments = (TextView) fields.findViewById(R.id.comments);
recentratingslabel = fields.findViewById(R.id.recentratingslabel);
abvstyleButton.setOnClickListener(new OnClickListener() {
=======
private class AvailabilityAdapter extends ArrayAdapter |
| Solution content |
|---|
TextView total, aroma, appearance, taste, palate, overall, username, comments; } private class AvailabilityAdapter extends ArrayAdapter |
| File |
|---|
| BeerViewFragment.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Class signature |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
((ViewPager) container).addView(pagerAvailabilityView, 0);
return pagerAvailabilityView;
}
<<<<<<< HEAD
});
uploadphotoButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
onStartPhotoUpload();
}
});
=======
return null;
}
@Override
public void destroyItem(View container, int position, Object object) {
((ViewPager) container).removeView((View) object);
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == (View) object;
}
@Override
public void finishUpdate(View container) {
}
@Override
public Parcelable saveState() {
return null;
}
@Override
public void startUpdate(View container) {
}
@Override
public void restoreState(Parcelable state, ClassLoader loader) {
}
>>>>>>> 65daa01ab93ab77dab5055f08fa62cc1e2270f2d
}
} |
| Solution content |
|---|
((ViewPager) container).addView(pagerAvailabilityView, 0);
return pagerAvailabilityView;
}
return null;
}
@Override
public void destroyItem(View container, int position, Object object) {
((ViewPager) container).removeView((View) object);
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == (View) object;
}
@Override
public void finishUpdate(View container) {
}
@Override
public Parcelable saveState() {
return null;
}
@Override
public void startUpdate(View container) {
}
@Override
public void restoreState(Parcelable state, ClassLoader loader) {
}
}
} |
| File |
|---|
| BeerViewFragment.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Method invocation |
| Return statement |