mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-09 22:00:39 +01:00
wrap code in if(DEBUG)
This commit is contained in:
parent
9644f40659
commit
c53616fd82
1 changed files with 17 additions and 13 deletions
|
@ -43,23 +43,27 @@ public class DisablesItem extends LinearLayout {
|
||||||
|
|
||||||
void init( CommsConnType typ, boolean[] state )
|
void init( CommsConnType typ, boolean[] state )
|
||||||
{
|
{
|
||||||
m_state = state;
|
if ( BuildConfig.DEBUG ) {
|
||||||
m_type = typ;
|
m_state = state;
|
||||||
((TextView)findViewById(R.id.addr_type)).setText( typ.toString() );
|
m_type = typ;
|
||||||
|
((TextView)findViewById(R.id.addr_type)).setText( typ.shortName() );
|
||||||
|
|
||||||
setupCheckbox( R.id.send, true );
|
setupCheckbox( R.id.send, true );
|
||||||
setupCheckbox( R.id.receive, false );
|
setupCheckbox( R.id.receive, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupCheckbox( int id, final boolean forSend )
|
private void setupCheckbox( int id, final boolean forSend )
|
||||||
{
|
{
|
||||||
final CheckBox cb = (CheckBox)findViewById( id );
|
if ( BuildConfig.DEBUG ) {
|
||||||
cb.setChecked( m_state[forSend?1:0] );
|
final CheckBox cb = (CheckBox)findViewById( id );
|
||||||
cb.setOnClickListener( new View.OnClickListener() {
|
cb.setChecked( m_state[forSend?1:0] );
|
||||||
@Override
|
cb.setOnClickListener( new View.OnClickListener() {
|
||||||
public void onClick( View view ) {
|
@Override
|
||||||
m_state[forSend?1:0] = cb.isChecked();
|
public void onClick( View view ) {
|
||||||
}
|
m_state[forSend?1:0] = cb.isChecked();
|
||||||
} );
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue