mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-11 22:11:21 -08:00
Update Android port
* java/org/gnu/emacs/EmacsContextMenu.java (display): Use `EmacsHolder' instead of `Holder'. * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Use `EmacsDialogButtonLayout' to ensure that buttons are wrapped properly. (display): Adjust for new holder class. * java/org/gnu/emacs/EmacsDialogButtonLayout.java (EmacsDialogButtonLayout, onMeasure, onLayout): New functions. * java/org/gnu/emacs/EmacsDrawLine.java: * java/org/gnu/emacs/EmacsFillPolygon.java: Remove redundant imports. * java/org/gnu/emacs/EmacsHolder.java (EmacsHolder<T>): * java/org/gnu/emacs/EmacsService.java (class Holder<T>) (getEmacsView, EmacsService): Rename `Holder' to `EmacsHolder' and make it public.
This commit is contained in:
parent
5f09df3d6a
commit
5b4dea0fc7
7 changed files with 195 additions and 25 deletions
|
|
@ -150,7 +150,7 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener
|
|||
AlertDialog dialog;
|
||||
int size;
|
||||
EmacsButton button;
|
||||
LinearLayout layout;
|
||||
EmacsDialogButtonLayout layout;
|
||||
Button buttonView;
|
||||
ViewGroup.LayoutParams layoutParams;
|
||||
|
||||
|
|
@ -192,19 +192,16 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener
|
|||
}
|
||||
else
|
||||
{
|
||||
/* There are more than 4 buttons. Add them all to a
|
||||
LinearLayout. */
|
||||
layout = new LinearLayout (context);
|
||||
layoutParams
|
||||
= new LinearLayout.LayoutParams (ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
/* There are more than 3 buttons. Add them all to a special
|
||||
container widget that handles wrapping. */
|
||||
|
||||
layout = new EmacsDialogButtonLayout (context);
|
||||
|
||||
for (EmacsButton emacsButton : buttons)
|
||||
{
|
||||
buttonView = new Button (context);
|
||||
buttonView.setText (emacsButton.name);
|
||||
buttonView.setOnClickListener (emacsButton);
|
||||
buttonView.setLayoutParams (layoutParams);
|
||||
buttonView.setEnabled (emacsButton.enabled);
|
||||
layout.addView (buttonView);
|
||||
}
|
||||
|
|
@ -336,9 +333,9 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener
|
|||
display ()
|
||||
{
|
||||
Runnable runnable;
|
||||
final Holder<Boolean> rc;
|
||||
final EmacsHolder<Boolean> rc;
|
||||
|
||||
rc = new Holder<Boolean> ();
|
||||
rc = new EmacsHolder<Boolean> ();
|
||||
runnable = new Runnable () {
|
||||
@Override
|
||||
public void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue