我在android中创建了一个自定义复合视图,该视图在相对布局中包含两个TextView。有两个类,一个是BarcodeScannerView,它是复合视图,另一个是使用自定义视图的活动。代码如下。 BarcodeScannerView.java public class BarcodeScannerView extends RelativeLayout implements View.OnCli
因此,这里是我的布局结构: - RelativeLayout (full screen)
- FrameLayout (full screen)
- Button (in the middle of the screen)
- RecyclerView (align parent bottom but with very big padding top to
我的自定义视图的代码: public class IndicatorView extends LinearLayout {
private int[] mColors = new int[]{Color.RED, Color.GREEN, Color.MAGENTA, Color.BLUE, Color.YELLOW, Color.GRAY};
public IndicatorView(Co