本文整理汇总了Java中com.tomergoldst.tooltips.ToolTipsManager类的典型用法代码示例。如果您正苦于以下问题:Java ToolTipsManager类的具体用法?Java ToolTipsManager怎么用?Java ToolTipsManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ToolTipsManager类属于com.tomergoldst.tooltips包,在下文中一共展示了ToolTipsManager类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: displayVideoTooltip
import com.tomergoldst.tooltips.ToolTipsManager; //导入依赖的package包/类
public void displayVideoTooltip(ViewGroup viewGroup) {
if (Build.VERSION.SDK_INT > 15) {
final ToolTipsManager toolTipsManager = new ToolTipsManager();
ToolTip toolTip = new ToolTip.Builder(getContext(), videoMuteButton, viewGroup,
getContext().getString(R.string.WebRtcCallControls_tap_to_enable_your_video),
ToolTip.POSITION_BELOW).build();
toolTipsManager.show(toolTip);
videoMuteButton.postDelayed(new Runnable() {
@Override
public void run() {
toolTipsManager.findAndDismiss(videoMuteButton);
}
}, 4000);
}
}
示例2: onCreate
import com.tomergoldst.tooltips.ToolTipsManager; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chat);
// Get the calling intent
Intent intent = getIntent();
// Get the username and avatarColour for the user from the calling intent and create a UserObject
mUsername = intent.getStringExtra(MainActivity.USERNAME_KEY);
mAvatarColour = intent.getStringExtra(MainActivity.AVATAR_COLOUR_KEY);
sCurrentUser = new UserObject(mUsername, mAvatarColour);
// Set up the ArrayLists
mMessageObjects = new ArrayList<>();
mUserObjects = new ArrayList<>();
mSelectedImages = new ArrayList<>();
// Get the View for the snackbar
mRootContainer = (RelativeLayout) findViewById(R.id.root_view);
// Initiate the Tooltips manager
toolTipsManager = new ToolTipsManager();
// Set up the users views and adapters
setUpUsersViews();
// Set up the message views and adapters
setUpMessagesViews();
// Set up the message send views and buttons
setUpMessageSendViews();
// Build the GoogleApiClient
buildGoogleApiClient();
// Build the Nearby MessageListener
buildMessageListener();
// Check if the MessageDialog needs to be shown
checkAndShowMessageDialog();
}