3 Replies - 304 Views - Last Post: 20 December 2018 - 04:23 AM

#1 Bobby_Bubbles   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 264
  • Joined: 13-March 18

radio buttons not being displayed.

Posted 19 December 2018 - 10:27 AM

tried adding a few radio buttons and in preview and actual application run doesnt display them. Here is my code.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".Rchoice">

    <Button
        android:id="@+id/btnCancel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:text="@string/lblCancel" />

    <Button
        android:id="@+id/btnConfirm"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:text="@string/lblConfirm" />

    <TextView
        android:id="@+id/tvRefundNull"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginStart="94dp"
        android:layout_marginTop="190dp"
        android:text="@string/lblRefund" />

    <RadioGroup
        android:id="@+id/radCrypto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/tvRefundNull"
        android:layout_centerHorizontal="true"
        android:text="@string/lblCrypto"
        android:visibility="visible" />

    <RadioGroup
        android:id="@+id/radFiat"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="224dp"
        android:text="@string/lblFiat"
        android:visibility="visible" />

</RelativeLayout>



and my java in case its needed.

package com.example.coinpayapp.coinpayapp;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class Rchoice extends AppCompatActivity {

    private Button btnCancel;

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        if (hasFocus) {
            hideSystemUI();
        }
    }

    private void hideSystemUI() {
        View decorView = getWindow().getDecorView();
        decorView.setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_IMMERSIVE
                        | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_FULLSCREEN);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rchoice);
        final String data[] = getIntent().getStringArrayExtra("info");
        btnCancel = (Button) findViewById(R.id.btnCancel);
        btnCancel.setonclickListener(new View.onclickListener() {
            public void onclick(View v) {
                Cancel();
            }
        });
    }

    public void Cancel (){
        Intent intent = new Intent(this,Index.class);
        startActivity(intent);
    }
}



Is This A Good Question/Topic? 0
  • +

Replies To: radio buttons not being displayed.

#2 Bobby_Bubbles   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 264
  • Joined: 13-March 18

Re: radio buttons not being displayed.

Posted 19 December 2018 - 10:53 AM

ignore it. im stupid and didnt realize it was just a radio group and notr the buttons itself.

please close.
Was This Post Helpful? 0
  • +
  • -

#3 wseng92   User is offline

  • D.I.C Addict
  • member icon

Reputation: 43
  • View blog
  • Posts: 631
  • Joined: 23-September 15

Re: radio buttons not being displayed.

Posted 19 December 2018 - 11:51 PM

solved ?
Was This Post Helpful? 0
  • +
  • -

#4 Bobby_Bubbles   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 264
  • Joined: 13-March 18

Re: radio buttons not being displayed.

Posted 20 December 2018 - 04:23 AM

Yes
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1