@@ -0,0 +1,2568 @@
+/*%0A * Copyright 2018 Nikita Shakarun%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage javax.microedition.lcdui;%0A%0Aimport android.view.View;%0A%0Apublic abstract class CustomItem extends Item %7B%0A%09protected static final int KEY_PRESS = 4;%0A%09protected static final int KEY_RELEASE = 8;%0A%09protected static final int KEY_REPEAT = 16;%0A%09protected static final int NONE = 0;%0A%09protected static final int POINTER_DRAG = 128;%0A%09protected static final int POINTER_PRESS = 32;%0A%09protected static final int POINTER_RELEASE = 64;%0A%09protected static final int TRAVERSE_HORIZONTAL = 1;%0A%09protected static final int TRAVERSE_VERTICAL = 2;%0A%0A%09private View view;%0A%0A%09protected CustomItem(String label) %7B%0A%09%09setLabel(label);%0A%09%7D%0A%0A%09public int getGameAction(int keyCode) %7B%0A%09%09return 0;%0A%09%7D%0A%0A%09protected final int getInteractionModes() %7B%0A%09%09return 0;%0A%09%7D%0A%0A%09protected abstract int getMinContentWidth();%0A%0A%09protected abstract int getMinContentHeight();%0A%0A%09protected abstract int getPrefContentWidth(int height);%0A%0A%09protected abstract int getPrefContentHeight(int width);%0A%0A%09protected abstract void paint(Graphics g, int w, int h);%0A%0A%09protected void sizeChanged(int w, int h) %7B%0A%09%7D%0A%0A%09protected final void invalidate() %7B%0A%09%7D%0A%0A%09protected final void repaint() %7B%0A%09%09repaint(0, 0, 0, 0);%0A%09%7D%0A%0A%09protected final void repaint(int x, int y, int width, int height) %7B%0A%09%7D%0A%0A%09protected boolean traverse(int dir, int viewportWidth, int viewportHeight, int%5B%5D visRect_inout) %7B%0A%09%09return false;%0A%09%7D%0A%0A%09protected void traverseOut() %7B%0A%09%7D%0A%0A%09protected void showNotify() %7B%0A%09%7D%0A%0A%09protected void hideNotify() %7B%0A%09%7D%0A%0A%09protected void keyPressed(int keyCode) %7B%0A%09%7D%0A%0A%09protected void keyRepeated(int keyCode) %7B%0A%09%7D%0A%0A%09protected void keyReleased(int keyCode) %7B%0A%09%7D%0A%0A%09protected void pointerPressed(int x, int y) %7B%0A%09%7D%0A%0A%09protected void pointerDragged(int x, int y) %7B%0A%09%7D%0A%0A%09protected void pointerReleased(int x, int y) %7B%0A%09%7D%0A%0A%09@Override%0A%09protected View getItemContentView() %7B%0A%09%09if (view == null) %7B%0A%09%09%09view = new View(getOwnerForm().getParentActivity());%0A%09%09%7D%0A%0A%09%09return view;%0A%09%7D%0A%0A%09@Override%0A%09protected void clearItemContentView() %7B%0A%09%09view = null;%0A%09%7D%0A%7D%0A

Add CustomItem stub