Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/179.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在android应用程序中锁定ios屏幕_Android - Fatal编程技术网

如何在android应用程序中锁定ios屏幕

如何在android应用程序中锁定ios屏幕,android,Android,我需要一些帮助。我需要做一个屏幕类似的屏幕锁iOS9。下面是这个屏幕的一个例子:如果有任何关于布局的经验或想法,我会很高兴。我想通过tablelayout和圆圈图像来做按钮,并在其中粘贴文本,但这可能是更好的想法。@metalink:我已经在android中实现了这一点 你该怎么办 有趣的信息:德国法院刚刚宣布苹果解锁专利的幻灯片无效。有时不复制视图1:1是个好主意,尽管这次苹果失去了这方面的专利。祝你好运;) 您的问题没有表明之前的任何研究尝试。为了得到好的回答,建议您在提问之前,出示您试图解

我需要一些帮助。我需要做一个屏幕类似的屏幕锁iOS9。下面是这个屏幕的一个例子:
如果有任何关于布局的经验或想法,我会很高兴。
我想通过tablelayout和圆圈图像来做按钮,并在其中粘贴文本,但这可能是更好的想法。@metalink:我已经在android中实现了这一点

你该怎么办
有趣的信息:德国法院刚刚宣布苹果解锁专利的幻灯片无效。有时不复制视图1:1是个好主意,尽管这次苹果失去了这方面的专利。祝你好运;)


您的问题没有表明之前的任何研究尝试。为了得到好的回答,建议您在提问之前,出示您试图解决问题的证据,无论是代码还是其他形式。StackOverflow不是免费的代码生成器或教程站点。如果您需要免费源代码,请在其他地方寻求帮助。
  <RelativeLayout
    ... >
    <LinearLayout
        android:id="@+id/contain"
        ... android:layout_width="250dip"
        android:orientation="horizontal"
        android:weightSum="4" >
        <!-- weightSum to 4 = whatever the screen, display 
             my children views in 4 sections -->
        <View
            ... android:layout_weight="1"
            android:background="@drawable/green_dots" />
        <!-- weight to 1 = this takes one section -->
        <View
            ... android:layout_weight="1"
            android:background="@drawable/green_dots" />
        <!-- weight to 1 = this takes one section -->
        <View
            ... android:layout_weight="1"
            android:background="@drawable/green_dots" />
        <View
            ... android:layout_weight="1"
            android:background="@drawable/green_dots" />
    </LinearLayout>
    <RelativeLayout
        android:layout_below="@id/contain" ... >
        ... Here display your buttons (or textviews) with 
            custom drawable background for each one
</RelativeLayout>  
 // init your buttons var
Button one, two, three, four, five ...;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // set the layout above
    setContentView(R.layout.activity_main);
    // init your buttons
    one = (Button) findViewById(R.id.button1);
    two = (Button) findViewById(R.id.button2);
    three = (Button) findViewById(R.id.button3);
    ... etc.

    // set them to your implementation
    one.setOnClickListener(this);
    two.setOnClickListener(this);
    three.setOnClickListener(this);
    ... etc.
}

// call this function when one button is pressed
public void onClick(View view) {
    // retrieves the id of clicked button
    switch(view.getId()) {
        case R.id.button1:
             methodToSaveNumber(int);
        break;
        case R.id.button2:
             methodToSaveNumber(int);
        break;
        case R.id.button3:
             methodToSaveNumber(int);
        break;
        ... etc.
    }
}