Commit 07492c3a by Thomas Krex

added feedback library -> enables feedback function for user,

developer can answer directly to the user by email
parent 0ae49c6c
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TTTAndroidClient</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="lib" path="libs/commons-io-2.4.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
......@@ -36,6 +36,15 @@
android:configChanges="orientation|screenSize"
android:label="Feeds"
android:launchMode="singleTask" >
<intent-filter>
<data android:scheme="http" />
<data android:host="ttt.in.tum.de" />
<data android:pathPattern=".*"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity
android:name="tttclient.activities.FeedDetailActivity"
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<stroke
android:width="1dip"
android:color="@android:color/background_dark" >
</stroke>
</shape>
\ No newline at end of file
......@@ -14,8 +14,16 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:background="@android:color/transparent"
android:text="@string/watch" >
</Button>
android:text="@string/watch" />
<Button
android:id="@+id/feedback_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/watch_button"
android:layout_alignRight="@+id/watch_button"
android:layout_below="@+id/watch_button"
android:layout_marginTop="124dp"
android:text="Feedback" />
</RelativeLayout>
\ No newline at end of file
......@@ -188,6 +188,16 @@ public class FeedActivity extends SherlockActivity implements
}
});
Intent intent = getIntent();
String action = intent.getAction();
if (Intent.ACTION_VIEW.equals(action)) {
Log.d("IntentFIlter", intent.getDataString());
urlTxt.setText(intent.getDataString());
addDialog.show();
}
}
@Override
......
......@@ -7,6 +7,7 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import com.actionbarsherlock.app.SherlockActivity;
import com.suredigit.inappfeedback.FeedbackDialog;
import de.tum.in.tttclient.R;
......@@ -17,11 +18,14 @@ import de.tum.in.tttclient.R;
*
*/
public class MainActivity extends SherlockActivity {
private FeedbackDialog feedBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
feedBack = new FeedbackDialog(this, "AF-C588E3CDEF37-CB");
Button watchButton = (Button) findViewById(R.id.watch_button);
watchButton.setOnClickListener(new OnClickListener() {
......@@ -33,6 +37,21 @@ public class MainActivity extends SherlockActivity {
}
});
Button feedbackButton = (Button) findViewById(R.id.feedback_button);
feedbackButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
feedBack.show();
}
});
}
@Override
protected void onPause() {
super.onPause();
feedBack.dismiss();
}
}
......@@ -136,7 +136,8 @@ public abstract class SherlockActivity extends Activity implements OnCreatePanel
return getSherlock().getMenuInflater();
}
public void invalidateOptionsMenu() {
@Override
public void invalidateOptionsMenu() {
getSherlock().dispatchInvalidateOptionsMenu();
}
......
......@@ -125,7 +125,8 @@ public abstract class SherlockExpandableListActivity extends ExpandableListActiv
return getSherlock().getMenuInflater();
}
public void invalidateOptionsMenu() {
@Override
public void invalidateOptionsMenu() {
getSherlock().dispatchInvalidateOptionsMenu();
}
......
......@@ -137,19 +137,22 @@ public class SherlockFragmentActivity extends Watson implements OnActionModeStar
// Native menu handling
///////////////////////////////////////////////////////////////////////////
public MenuInflater getSupportMenuInflater() {
@Override
public MenuInflater getSupportMenuInflater() {
if (ActionBarSherlock.DEBUG) Log.d(TAG, "[getSupportMenuInflater]");
return getSherlock().getMenuInflater();
}
public void invalidateOptionsMenu() {
@Override
public void invalidateOptionsMenu() {
if (ActionBarSherlock.DEBUG) Log.d(TAG, "[invalidateOptionsMenu]");
getSherlock().dispatchInvalidateOptionsMenu();
}
public void supportInvalidateOptionsMenu() {
@Override
public void supportInvalidateOptionsMenu() {
if (ActionBarSherlock.DEBUG) Log.d(TAG, "[supportInvalidateOptionsMenu]");
invalidateOptionsMenu();
......@@ -234,15 +237,18 @@ public class SherlockFragmentActivity extends Watson implements OnActionModeStar
// Sherlock menu handling
///////////////////////////////////////////////////////////////////////////
public boolean onCreateOptionsMenu(Menu menu) {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
public boolean onPrepareOptionsMenu(Menu menu) {
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
return true;
}
public boolean onOptionsItemSelected(MenuItem item) {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
return false;
}
......
......@@ -136,7 +136,8 @@ public abstract class SherlockListActivity extends ListActivity implements OnCre
return getSherlock().getMenuInflater();
}
public void invalidateOptionsMenu() {
@Override
public void invalidateOptionsMenu() {
getSherlock().dispatchInvalidateOptionsMenu();
}
......
......@@ -136,7 +136,8 @@ public abstract class SherlockPreferenceActivity extends PreferenceActivity impl
return getSherlock().getMenuInflater();
}
public void invalidateOptionsMenu() {
@Override
public void invalidateOptionsMenu() {
getSherlock().dispatchInvalidateOptionsMenu();
}
......
......@@ -506,10 +506,12 @@ public final class AnimatorSet extends Animator {
mDelayAnim.setDuration(mStartDelay);
mDelayAnim.addListener(new AnimatorListenerAdapter() {
boolean canceled = false;
public void onAnimationCancel(Animator anim) {
@Override
public void onAnimationCancel(Animator anim) {
canceled = true;
}
public void onAnimationEnd(Animator anim) {
@Override
public void onAnimationEnd(Animator anim) {
if (!canceled) {
int numNodes = nodesToStart.size();
for (int i = 0; i < numNodes; ++i) {
......@@ -642,13 +644,15 @@ public final class AnimatorSet extends Animator {
* to prevent follow-on animations from running when some dependency
* animation is canceled.
*/
public void onAnimationCancel(Animator animation) {
@Override
public void onAnimationCancel(Animator animation) {
}
/**
* An end event is received - see if this is an event we are listening for
*/
public void onAnimationEnd(Animator animation) {
@Override
public void onAnimationEnd(Animator animation) {
if (mRule == Dependency.AFTER) {
startIfReady(animation);
}
......@@ -657,13 +661,15 @@ public final class AnimatorSet extends Animator {
/**
* Ignore repeat events for now
*/
public void onAnimationRepeat(Animator animation) {
@Override
public void onAnimationRepeat(Animator animation) {
}
/**
* A start event is received - see if this is an event we are listening for
*/
public void onAnimationStart(Animator animation) {
@Override
public void onAnimationStart(Animator animation) {
if (mRule == Dependency.WITH) {
startIfReady(animation);
}
......@@ -711,7 +717,8 @@ public final class AnimatorSet extends Animator {
mAnimatorSet = animatorSet;
}
public void onAnimationCancel(Animator animation) {
@Override
public void onAnimationCancel(Animator animation) {
if (!mTerminated) {
// Listeners are already notified of the AnimatorSet canceling in cancel().
// The logic below only kicks in when animations end normally
......@@ -726,7 +733,8 @@ public final class AnimatorSet extends Animator {
}
}
public void onAnimationEnd(Animator animation) {
@Override
public void onAnimationEnd(Animator animation) {
animation.removeListener(this);
mPlayingSet.remove(animation);
Node animNode = mAnimatorSet.mNodeMap.get(animation);
......@@ -760,11 +768,13 @@ public final class AnimatorSet extends Animator {
}
// Nothing to do
public void onAnimationRepeat(Animator animation) {
@Override
public void onAnimationRepeat(Animator animation) {
}
// Nothing to do
public void onAnimationStart(Animator animation) {
@Override
public void onAnimationStart(Animator animation) {
}
}
......
......@@ -35,7 +35,8 @@ public class FloatEvaluator implements TypeEvaluator<Number> {
* @return A linear interpolation between the start and end values, given the
* <code>fraction</code> parameter.
*/
public Float evaluate(float fraction, Number startValue, Number endValue) {
@Override
public Float evaluate(float fraction, Number startValue, Number endValue) {
float startFloat = startValue.floatValue();
return startFloat + fraction * (endValue.floatValue() - startFloat);
}
......
......@@ -35,7 +35,8 @@ public class IntEvaluator implements TypeEvaluator<Integer> {
* @return A linear interpolation between the start and end values, given the
* <code>fraction</code> parameter.
*/
public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
@Override
public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
int startInt = startValue;
return (int)(startInt + fraction * (endValue - startInt));
}
......
......@@ -253,11 +253,13 @@ public abstract class Keyframe implements Cloneable {
mValueType = mHasValue ? value.getClass() : Object.class;
}
public Object getValue() {
@Override
public Object getValue() {
return mValue;
}
public void setValue(Object value) {
@Override
public void setValue(Object value) {
mValue = value;
mHasValue = (value != null);
}
......@@ -296,11 +298,13 @@ public abstract class Keyframe implements Cloneable {
return mValue;
}
public Object getValue() {
@Override
public Object getValue() {
return mValue;
}
public void setValue(Object value) {
@Override
public void setValue(Object value) {
if (value != null && value.getClass() == Integer.class) {
mValue = ((Integer)value).intValue();
mHasValue = true;
......@@ -340,11 +344,13 @@ public abstract class Keyframe implements Cloneable {
return mValue;
}
public Object getValue() {
@Override
public Object getValue() {
return mValue;
}
public void setValue(Object value) {
@Override
public void setValue(Object value) {
if (value != null && value.getClass() == Float.class) {
mValue = ((Float)value).floatValue();
mHasValue = true;
......
......@@ -507,7 +507,8 @@ public class ValueAnimator extends Animator {
* value makes it easier to compose statements together that construct and then set the
* duration, as in <code>ValueAnimator.ofInt(0, 10).setDuration(500).start()</code>.
*/
public ValueAnimator setDuration(long duration) {
@Override
public ValueAnimator setDuration(long duration) {
if (duration < 0) {
throw new IllegalArgumentException("Animators cannot have negative duration: " +
duration);
......@@ -521,7 +522,8 @@ public class ValueAnimator extends Animator {
*
* @return The length of the animation, in milliseconds.
*/
public long getDuration() {
@Override
public long getDuration() {
return mDuration;
}
......@@ -690,7 +692,8 @@ public class ValueAnimator extends Animator {
*
* @return the number of milliseconds to delay running the animation
*/
public long getStartDelay() {
@Override
public long getStartDelay() {
return mStartDelay;
}
......@@ -700,7 +703,8 @@ public class ValueAnimator extends Animator {
* @param startDelay The amount of the delay, in milliseconds
*/
public void setStartDelay(long startDelay) {
@Override
public void setStartDelay(long startDelay) {
this.mStartDelay = startDelay;
}
......
......@@ -34,42 +34,48 @@ public abstract class NineViewGroup extends ViewGroup {
super.setVisibility(visibility);
}
public float getAlpha() {
@Override
public float getAlpha() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getAlpha();
} else {
return super.getAlpha();
}
}
public void setAlpha(float alpha) {
@Override
public void setAlpha(float alpha) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setAlpha(alpha);
} else {
super.setAlpha(alpha);
}
}
public float getTranslationX() {
@Override
public float getTranslationX() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getTranslationX();
} else {
return super.getTranslationX();
}
}
public void setTranslationX(float translationX) {
@Override
public void setTranslationX(float translationX) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setTranslationX(translationX);
} else {
super.setTranslationX(translationX);
}
}
public float getTranslationY() {
@Override
public float getTranslationY() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getTranslationY();
} else {
return super.getTranslationY();
}
}
public void setTranslationY(float translationY) {
@Override
public void setTranslationY(float translationY) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setTranslationY(translationY);
} else {
......
......@@ -26,28 +26,32 @@ public class NineFrameLayout extends FrameLayout {
super.setVisibility(visibility);
}
public float getAlpha() {
@Override
public float getAlpha() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getAlpha();
} else {
return super.getAlpha();
}
}
public void setAlpha(float alpha) {
@Override
public void setAlpha(float alpha) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setAlpha(alpha);
} else {
super.setAlpha(alpha);
}
}
public float getTranslationY() {
@Override
public float getTranslationY() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getTranslationY();
} else {
return super.getTranslationY();
}
}
public void setTranslationY(float translationY) {
@Override
public void setTranslationY(float translationY) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setTranslationY(translationY);
} else {
......
......@@ -24,14 +24,16 @@ public class NineHorizontalScrollView extends HorizontalScrollView {
super.setVisibility(visibility);
}
public float getAlpha() {
@Override
public float getAlpha() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getAlpha();
} else {
return super.getAlpha();
}
}
public void setAlpha(float alpha) {
@Override
public void setAlpha(float alpha) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setAlpha(alpha);
} else {
......
......@@ -26,28 +26,32 @@ public class NineLinearLayout extends LinearLayout {
super.setVisibility(visibility);
}
public float getAlpha() {
@Override
public float getAlpha() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getAlpha();
} else {
return super.getAlpha();
}
}
public void setAlpha(float alpha) {
@Override
public void setAlpha(float alpha) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setAlpha(alpha);
} else {
super.setAlpha(alpha);
}
}
public float getTranslationX() {
@Override
public float getTranslationX() {
if (AnimatorProxy.NEEDS_PROXY) {
return mProxy.getTranslationX();
} else {
return super.getTranslationX();
}
}
public void setTranslationX(float translationX) {
@Override
public void setTranslationX(float translationX) {
if (AnimatorProxy.NEEDS_PROXY) {
mProxy.setTranslationX(translationX);
} else {
......
......@@ -118,7 +118,8 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
return new MenuInflater(mContext);
}
public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
@Override
public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
return mCallback.onActionItemClicked(this, item);
}
......@@ -137,12 +138,14 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
public void onCloseSubMenu(SubMenuBuilder menu) {
}
public void onMenuModeChange(MenuBuilder menu) {
@Override
public void onMenuModeChange(MenuBuilder menu) {
invalidate();
mContextView.showOverflowMenu();
}
public boolean isUiFocusable() {
@Override
public boolean isUiFocusable() {
return mFocusable;
}
}
......@@ -49,26 +49,31 @@ public class ActionMenu implements Menu {
return mContext;
}
public MenuItem add(CharSequence title) {
@Override
public MenuItem add(CharSequence title) {
return add(0, 0, 0, title);
}
public MenuItem add(int titleRes) {
@Override
public MenuItem add(int titleRes) {
return add(0, 0, 0, titleRes);
}
public MenuItem add(int groupId, int itemId, int order, int titleRes) {
@Override
public MenuItem add(int groupId, int itemId, int order, int titleRes) {
return add(groupId, itemId, order, mContext.getResources().getString(titleRes));
}
public MenuItem add(int groupId, int itemId, int order, CharSequence title) {
@Override
public MenuItem add(int groupId, int itemId, int order, CharSequence title) {
ActionMenuItem item = new ActionMenuItem(getContext(),
groupId, itemId, 0, order, title);
mItems.add(order, item);
return item;
}
public int addIntentOptions(int groupId, int itemId, int order,
@Override
public int addIntentOptions(int groupId, int itemId, int order,
ComponentName caller, Intent[] specifics, Intent intent, int flags,
MenuItem[] outSpecificItems) {
PackageManager pm = mContext.getPackageManager();
......@@ -98,32 +103,38 @@ public class ActionMenu implements Menu {
return N;
}
public SubMenu addSubMenu(CharSequence title) {
@Override
public SubMenu addSubMenu(CharSequence title) {
// TODO Implement submenus
return null;
}
public SubMenu addSubMenu(int titleRes) {
@Override
public SubMenu addSubMenu(int titleRes) {
// TODO Implement submenus
return null;
}
public SubMenu addSubMenu(int groupId, int itemId, int order,
@Override
public SubMenu addSubMenu(int groupId, int itemId, int order,
CharSequence title) {
// TODO Implement submenus
return null;
}
public SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes) {
@Override
public SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes) {
// TODO Implement submenus
return null;
}
public void clear() {
@Override
public void clear() {
mItems.clear();
}
public void close() {
@Override
public void close() {
}
private int findItemIndex(int id) {
......@@ -138,15 +149,18 @@ public class ActionMenu implements Menu {
return -1;
}