Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #31 from novoda/deprecate-set-usage-hints
Browse files Browse the repository at this point in the history
#30 Deprecate set usage hints instead of deleting
  • Loading branch information
ouchadam authored Apr 11, 2018
2 parents b78f1e9 + 39fbfce commit 712ba0d
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.StringRes;
import android.support.v4.view.AccessibilityDelegateCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import android.view.View;
Expand All @@ -22,6 +23,46 @@ public ActionsAccessibilityDelegate(Resources resources, Actions actions, UsageH
this.usageHints = usageHints;
}

/**
* Label describing the action that will be performed on click
*
* @deprecated Create UsageHints explicitly and pass via the constructor.
*/
@Deprecated
public void setClickLabel(@StringRes int clickLabel) {
usageHints.setClickLabel(clickLabel);
}

/**
* Label describing the action that will be performed on click
*
* @deprecated Create UsageHints explicitly and pass via the constructor.
*/
@Deprecated
public void setClickLabel(CharSequence clickLabel) {
usageHints.setClickLabel(clickLabel);
}

/**
* Label describing the action that will be performed on long click
*
* @deprecated Create UsageHints explicitly and pass via the constructor.
*/
@Deprecated
public void setLongClickLabel(@StringRes int longClickLabel) {
usageHints.setLongClickLabel(longClickLabel);
}

/**
* Label describing the action that will be performed on long click
*
* @deprecated Create UsageHints explicitly and pass via the constructor.
*/
@Deprecated
public void setLongClickLabel(CharSequence longClickLabel) {
usageHints.setLongClickLabel(longClickLabel);
}

@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
super.onInitializeAccessibilityNodeInfo(host, info);
Expand Down

0 comments on commit 712ba0d

Please sign in to comment.