remove @BindView from RileyLinkStatusActivity

This commit is contained in:
Milos Kozak 2019-08-06 23:22:56 +02:00
parent fe716bdc2e
commit a0eef61745

View file

@ -1,21 +1,20 @@
package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog;
import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.view.View;
import android.widget.TextView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.tabs.TabLayout;
import butterknife.BindView;
import java.util.ArrayList;
import java.util.List;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.plugins.pump.common.dialog.RefreshableInterface;
@ -24,16 +23,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.Riley
public class RileyLinkStatusActivity extends AppCompatActivity {
@BindView(R.id.rls_t1_connection_status)
TextView connectionStatus;
@BindView(R.id.rls_t1_configured_address)
TextView configuredAddress;
@BindView(R.id.rls_t1_connected_device)
TextView connectedDevice;
@BindView(R.id.rls_t1_connection_error)
TextView connectionError;
RileyLinkServiceData rileyLinkServiceData;
@ -63,10 +55,7 @@ public class RileyLinkStatusActivity extends AppCompatActivity {
tabLayout.setupWithViewPager(mViewPager);
floatingActionButton = (FloatingActionButton) findViewById(R.id.rileylink_settings_fab);
floatingActionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
floatingActionButton.setOnClickListener(v -> {
RefreshableInterface selectableInterface = (RefreshableInterface) mSectionsPagerAdapter
.getItem(tabLayout.getSelectedTabPosition());
@ -76,13 +65,12 @@ public class RileyLinkStatusActivity extends AppCompatActivity {
// Toast.makeText(getApplicationContext(), "Test pos: " + tabLayout.getSelectedTabPosition(),
// Toast.LENGTH_LONG);
}
});
this.connectionStatus = (TextView)findViewById(R.id.rls_t1_connection_status);
this.configuredAddress = (TextView)findViewById(R.id.rls_t1_configured_address);
this.connectedDevice = (TextView)findViewById(R.id.rls_t1_connected_device);
this.connectionError = (TextView)findViewById(R.id.rls_t1_connection_error);
this.connectionStatus = findViewById(R.id.rls_t1_connection_status);
this.configuredAddress = findViewById(R.id.rls_t1_configured_address);
this.connectedDevice = findViewById(R.id.rls_t1_connected_device);
this.connectionError = findViewById(R.id.rls_t1_connection_error);
rileyLinkServiceData = RileyLinkUtil.getRileyLinkServiceData();