remove @BindView from RileyLinkStatusActivity
This commit is contained in:
parent
fe716bdc2e
commit
a0eef61745
1 changed files with 18 additions and 30 deletions
|
@ -1,21 +1,20 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog;
|
package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentPagerAdapter;
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
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.floatingactionbutton.FloatingActionButton;
|
||||||
import com.google.android.material.tabs.TabLayout;
|
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.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.dialog.RefreshableInterface;
|
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 {
|
public class RileyLinkStatusActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@BindView(R.id.rls_t1_connection_status)
|
|
||||||
TextView connectionStatus;
|
TextView connectionStatus;
|
||||||
|
|
||||||
@BindView(R.id.rls_t1_configured_address)
|
|
||||||
TextView configuredAddress;
|
TextView configuredAddress;
|
||||||
|
|
||||||
@BindView(R.id.rls_t1_connected_device)
|
|
||||||
TextView connectedDevice;
|
TextView connectedDevice;
|
||||||
|
|
||||||
@BindView(R.id.rls_t1_connection_error)
|
|
||||||
TextView connectionError;
|
TextView connectionError;
|
||||||
RileyLinkServiceData rileyLinkServiceData;
|
RileyLinkServiceData rileyLinkServiceData;
|
||||||
|
|
||||||
|
@ -63,10 +55,7 @@ public class RileyLinkStatusActivity extends AppCompatActivity {
|
||||||
tabLayout.setupWithViewPager(mViewPager);
|
tabLayout.setupWithViewPager(mViewPager);
|
||||||
|
|
||||||
floatingActionButton = (FloatingActionButton) findViewById(R.id.rileylink_settings_fab);
|
floatingActionButton = (FloatingActionButton) findViewById(R.id.rileylink_settings_fab);
|
||||||
floatingActionButton.setOnClickListener(new View.OnClickListener() {
|
floatingActionButton.setOnClickListener(v -> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
|
|
||||||
RefreshableInterface selectableInterface = (RefreshableInterface) mSectionsPagerAdapter
|
RefreshableInterface selectableInterface = (RefreshableInterface) mSectionsPagerAdapter
|
||||||
.getItem(tabLayout.getSelectedTabPosition());
|
.getItem(tabLayout.getSelectedTabPosition());
|
||||||
|
@ -76,13 +65,12 @@ public class RileyLinkStatusActivity extends AppCompatActivity {
|
||||||
|
|
||||||
// Toast.makeText(getApplicationContext(), "Test pos: " + tabLayout.getSelectedTabPosition(),
|
// Toast.makeText(getApplicationContext(), "Test pos: " + tabLayout.getSelectedTabPosition(),
|
||||||
// Toast.LENGTH_LONG);
|
// Toast.LENGTH_LONG);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.connectionStatus = (TextView)findViewById(R.id.rls_t1_connection_status);
|
this.connectionStatus = findViewById(R.id.rls_t1_connection_status);
|
||||||
this.configuredAddress = (TextView)findViewById(R.id.rls_t1_configured_address);
|
this.configuredAddress = findViewById(R.id.rls_t1_configured_address);
|
||||||
this.connectedDevice = (TextView)findViewById(R.id.rls_t1_connected_device);
|
this.connectedDevice = findViewById(R.id.rls_t1_connected_device);
|
||||||
this.connectionError = (TextView)findViewById(R.id.rls_t1_connection_error);
|
this.connectionError = findViewById(R.id.rls_t1_connection_error);
|
||||||
|
|
||||||
rileyLinkServiceData = RileyLinkUtil.getRileyLinkServiceData();
|
rileyLinkServiceData = RileyLinkUtil.getRileyLinkServiceData();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue