Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
imndx committed Mar 10, 2021
1 parent 3b7ab6c commit dd52e39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
import android.text.Editable;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.Switch;
import android.widget.Toast;

import com.google.android.material.switchmaterial.SwitchMaterial;

import butterknife.BindView;
import butterknife.OnClick;
import butterknife.OnTextChanged;
Expand All @@ -26,10 +27,10 @@ public class CreateConferenceActivity extends WfcBaseActivity {
FixedTextInputEditText titleEditText;
@BindView(R2.id.conferenceDescTextInputEditText)
FixedTextInputEditText descEditText;
@BindView((R2.id.audioOnlySwitch))
Switch audioOnlySwitch;
@BindView((R2.id.videoSwitch))
SwitchMaterial videoSwitch;
@BindView((R2.id.audienceSwitch))
Switch audienceSwitch;
SwitchMaterial audienceSwitch;
@BindView(R2.id.createConferenceBtn)
Button createButton;

Expand Down Expand Up @@ -63,7 +64,7 @@ void conferenceDescChannelName(Editable editable) {

@OnClick(R2.id.createConferenceBtn)
public void onClickCreateBtn() {
boolean audioOnly = audioOnlySwitch.isChecked();
boolean audioOnly = !videoSwitch.isChecked();
boolean audience = audienceSwitch.isChecked();
String title = titleEditText.getText().toString();
String desc = descEditText.getText().toString();
Expand Down
16 changes: 9 additions & 7 deletions uikit/src/main/res/layout/conference_create_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,28 @@
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>

<Switch
android:id="@+id/audioOnlySwitch"
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/videoSwitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:padding="20dp"
android:text="AudioOnly" />
android:text="开启视频" />

<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/audienceSwitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:padding="20dp"
android:text="Audience" />
android:text="互动会议" />

<Button
android:id="@+id/createConferenceBtn"
android:layout_width="match_parent"
android:enabled="false"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="创建会议" />
android:enabled="false"
android:text="开始会议" />

</LinearLayout>

0 comments on commit dd52e39

Please sign in to comment.