Removed considerations of item ID and position from tag making method

This commit is contained in:
Phillip Hsu 2016-09-07 02:51:05 -07:00
parent 17ad81d55e
commit e1d858a06a
4 changed files with 3 additions and 10 deletions

View File

@ -38,7 +38,7 @@ public abstract class DialogFragmentController<T extends DialogFragment> {
// Typically, we can't cast to a generic type. However, I've written non-generic code that
// blindly casts the result to an arbitrary type that I expect is correct, so this is
// pretty much the same thing.
Log.d(TAG, "Finding dialog with tag " + tag);
Log.d(TAG, "Finding dialog by tag " + tag);
return (T) mFragmentManager.findFragmentByTag(tag);
}
}

View File

@ -301,6 +301,6 @@ public abstract class BaseAlarmViewHolder extends BaseViewHolder<Alarm> {
}
private String makeTag(@IdRes int viewId) {
return FragmentTagUtils.makeTag(BaseAlarmViewHolder.class, viewId, getItemId());
return FragmentTagUtils.makeTag(BaseAlarmViewHolder.class, viewId);
}
}

View File

@ -198,6 +198,6 @@ public class TimerViewHolder extends BaseViewHolder<Timer> {
}
private String makeTag(@IdRes int viewId) {
return FragmentTagUtils.makeTag(TimerViewHolder.class, viewId, getItemId());
return FragmentTagUtils.makeTag(TimerViewHolder.class, viewId);
}
}

View File

@ -14,12 +14,5 @@ public final class FragmentTagUtils {
return cls.getName() + ":" + viewId;
}
/**
* A version suitable for our ViewHolders.
*/
public static String makeTag(Class<?> cls, @IdRes int viewId, long itemId) {
return makeTag(cls, viewId) + ":" + itemId;
}
private FragmentTagUtils() {}
}