Search in sources :

Example 1 with RecyclerLayoutManager

use of run.wallet.iota.ui.RecyclerLayoutManager in project run-wallet-android by runplay.

the class NetworkNodesAddFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    listNodes.setLayoutManager(new RecyclerLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    ((AppCompatActivity) getActivity()).setSupportActionBar(addNodeToolbar);
    setHasOptionsMenu(false);
    enterPod.setBackgroundColor(B.getColor(getActivity(), AppTheme.getSecondary()));
    addNodeToolbar.setNavigationIcon(getResources().getDrawable(R.drawable.md_nav_back));
    addNodeToolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            getActivity().onBackPressed();
        }
    });
    protocol.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            changeProtocol();
        }
    });
    addNodeBtn.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Nodes.Node node = new Nodes.Node();
            node.ip = nodeAddress.getText().toString();
            node.port = Sf.toInt(port.getText().toString());
            node.protocol = protocol.getText().toString();
            node.ip = Utils.stripHttp(node.ip);
            if (node.ip.length() > 3 && node.ip.contains(".") && node.port > 0) {
                Store.addNode(getActivity(), node.ip, node.port, node.protocol);
                getActivity().onBackPressed();
            } else {
                addressLayout.setError(getString(R.string.messages_enter_neighbor_address));
            }
        }
    });
    nodeAddress.addTextChangedListener(new TextWatcher() {

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
        }

        @Override
        public void afterTextChanged(Editable s) {
            // nodeAddress.
            addressLayout.setError(null);
        }
    });
    adapter = new AddNodesListAdapter(getActivity(), this);
    listNodes.setAdapter(adapter);
}
Also used : AddNodesListAdapter(run.wallet.iota.ui.adapter.AddNodesListAdapter) AppCompatActivity(android.support.v7.app.AppCompatActivity) BindView(butterknife.BindView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) ListView(android.widget.ListView) Nodes(run.wallet.iota.model.Nodes) RecyclerLayoutManager(run.wallet.iota.ui.RecyclerLayoutManager) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable)

Example 2 with RecyclerLayoutManager

use of run.wallet.iota.ui.RecyclerLayoutManager in project run-wallet-android by runplay.

the class NetworkNodesFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    recyclerView.setLayoutManager(new RecyclerLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    nodesTextPod.setBackgroundColor(B.getColor(getActivity(), AppTheme.getSecondary()));
}
Also used : RecyclerLayoutManager(run.wallet.iota.ui.RecyclerLayoutManager)

Example 3 with RecyclerLayoutManager

use of run.wallet.iota.ui.RecyclerLayoutManager in project run-wallet-android by runplay.

the class WalletAddressesFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    recyclerView.setLayoutManager(new RecyclerLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    NavigationView navigationView = getActivity().findViewById(R.id.nav_view);
    navigationView.getMenu().findItem(R.id.nav_wallet).setChecked(true);
    yesButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            GetFirstLoadRequestHandler.setUserConfirm(Store.getCurrentSeed().id, true);
            confirmPod.setVisibility(View.GONE);
            firstLoadPod.setVisibility(View.VISIBLE);
        }
    });
    noButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            GetFirstLoadRequestHandler.setUserConfirm(Store.getCurrentSeed().id, false);
            confirmPod.setVisibility(View.GONE);
            firstLoadPod.setVisibility(View.VISIBLE);
        }
    });
}
Also used : RecyclerLayoutManager(run.wallet.iota.ui.RecyclerLayoutManager) NavigationView(android.support.design.widget.NavigationView) NavigationView(android.support.design.widget.NavigationView) BindView(butterknife.BindView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView)

Example 4 with RecyclerLayoutManager

use of run.wallet.iota.ui.RecyclerLayoutManager in project run-wallet-android by runplay.

the class ChooseSeedFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    recyclerView.setLayoutManager(new RecyclerLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    ((AppCompatActivity) getActivity()).setSupportActionBar(chooseSeedToolbar);
    setHasOptionsMenu(true);
    setAdapter();
    fabSeed.setVisibility(View.VISIBLE);
    defaultClick.setBackgroundColor(B.getColor(getActivity(), AppTheme.getPrimaryDark()));
    setupXchangeBtns();
    defaultClick.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (Store.getCurrentWallet() != null) {
                UiManager.openFragment(getActivity(), WalletTabFragment.class);
            }
        }
    });
}
Also used : RecyclerLayoutManager(run.wallet.iota.ui.RecyclerLayoutManager) AppCompatActivity(android.support.v7.app.AppCompatActivity) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView) RecyclerView(android.support.v7.widget.RecyclerView)

Example 5 with RecyclerLayoutManager

use of run.wallet.iota.ui.RecyclerLayoutManager in project run-wallet-android by runplay.

the class NetworkNeighborsFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    recyclerView.setLayoutManager(new RecyclerLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    fabAddButton.setVisibility(View.VISIBLE);
    recyclerView.setBackgroundColor(B.getColor(getActivity(), R.color.whiteAlpha75));
    revealView.setVisibility(View.INVISIBLE);
    isEditTextVisible = false;
}
Also used : RecyclerLayoutManager(run.wallet.iota.ui.RecyclerLayoutManager)

Aggregations

RecyclerLayoutManager (run.wallet.iota.ui.RecyclerLayoutManager)6 RecyclerView (android.support.v7.widget.RecyclerView)4 View (android.view.View)4 TextView (android.widget.TextView)4 BindView (butterknife.BindView)4 NavigationView (android.support.design.widget.NavigationView)2 AppCompatActivity (android.support.v7.app.AppCompatActivity)2 Editable (android.text.Editable)1 TextWatcher (android.text.TextWatcher)1 ViewGroup (android.view.ViewGroup)1 ListView (android.widget.ListView)1 Nodes (run.wallet.iota.model.Nodes)1 AddNodesListAdapter (run.wallet.iota.ui.adapter.AddNodesListAdapter)1