Hello.
In order to test getRecommendedTimeoutMillis method with FLAG_CONTENT_CONTROLS in AccessibilityManager class, I created snackBar.
FLAG_CONTENT_CONTROLS method is android Q API that control timeout function within accessibility service is enabled.
In other words, if default snackBar set to show short, the snackBar is disappeared very shortly.
But if I use snakBar with getRecommendedTimeoutMillis method, once accessibility service such as TalkBack is enabled, blind users can interact with snackBar with more easily.
Because I have Pixel 2 and enrolled android Q beta, I can test new API.
By the way, within my snackBar, I really don't know how to apply getRecommendedTimeoutMillis method to my snackBar.
Actually I'm really new to java, could you help me?
If you can write code include my snackBar code with getRecommendedTimeoutMillis method, I can copy it, past, and test.
My snackBar code is below.
public void snackbarWithAction(View view){
Snackbar snackbar = Snackbar.make(coordinatorLayout,"Snackbar With Action",Snackbar.LENGTH_SHORT);
snackbar.setAction("UNDO", new View.OnClickListener() {
@override
public void onClick(View view) {
Toast.makeText(getApplicationContext(),"Undo action",Toast.LENGTH_SHORT).show();
}
});
snackbar.show();
}
Thank you so much in advance.
In order to test getRecommendedTimeoutMillis method with FLAG_CONTENT_CONTROLS in AccessibilityManager class, I created snackBar.
FLAG_CONTENT_CONTROLS method is android Q API that control timeout function within accessibility service is enabled.
In other words, if default snackBar set to show short, the snackBar is disappeared very shortly.
But if I use snakBar with getRecommendedTimeoutMillis method, once accessibility service such as TalkBack is enabled, blind users can interact with snackBar with more easily.
Because I have Pixel 2 and enrolled android Q beta, I can test new API.
By the way, within my snackBar, I really don't know how to apply getRecommendedTimeoutMillis method to my snackBar.
Actually I'm really new to java, could you help me?
If you can write code include my snackBar code with getRecommendedTimeoutMillis method, I can copy it, past, and test.
My snackBar code is below.
public void snackbarWithAction(View view){
Snackbar snackbar = Snackbar.make(coordinatorLayout,"Snackbar With Action",Snackbar.LENGTH_SHORT);
snackbar.setAction("UNDO", new View.OnClickListener() {
@override
public void onClick(View view) {
Toast.makeText(getApplicationContext(),"Undo action",Toast.LENGTH_SHORT).show();
}
});
snackbar.show();
}
Thank you so much in advance.