Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Crouton 库的Builder类具有一些方法,例如setTextSize(),setFontName()等。我怎样才能使用这个类来更改这个库的默认配置?
Builder
setTextSize()
setFontName()
例如:
Crouton.makeText(activity, "HELLO" , Style.ALERT, rootLayout).show();
我如何为这条线使用构建器?
只要我能理解你的问题,你想要这样的东西:
import de.keyboardsurfer.android.widget.crouton.Style.Builder; Crouton.makeText(activity, "HELLO" , new Style.Builder() .setTextSize(12) .setFontName(someFontName) ... .build(), rootLayout) .show();