mirror of
https://github.com/status-im/syng-client.git
synced 2025-02-22 16:08:11 +00:00
Merge branch 'master' of https://github.com/syng-io/syng-client
This commit is contained in:
commit
e154aa83dd
@ -7,6 +7,7 @@ import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
@ -95,7 +96,7 @@ public abstract class BaseActivity extends AppCompatActivity implements
|
||||
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar);
|
||||
mDrawerLayout.setStatusBarBackgroundColor(getColor(android.R.color.black));
|
||||
mDrawerLayout.setStatusBarBackgroundColor(ContextCompat.getColor(this, android.R.color.black));
|
||||
}
|
||||
|
||||
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, toolbar,
|
||||
|
@ -19,9 +19,7 @@ import java.util.List;
|
||||
|
||||
import io.syng.R;
|
||||
import io.syng.entity.Profile;
|
||||
import io.syng.util.GeneralUtil;
|
||||
import io.syng.util.PrefsUtil;
|
||||
import io.syng.util.ProfileManager;
|
||||
import io.syng.util.*;
|
||||
|
||||
import static org.ethereum.config.SystemProperties.CONFIG;
|
||||
|
||||
|
@ -75,6 +75,16 @@ public class Profile implements Serializable {
|
||||
return privateKeys;
|
||||
}
|
||||
|
||||
public List<String> getAddresses() {
|
||||
|
||||
List<String> addresses = new ArrayList<>();
|
||||
for (String privateKey: privateKeys) {
|
||||
ECKey key = ECKey.fromPrivate(Hex.decode(privateKey));
|
||||
addresses.add(Hex.toHexString(key.getAddress()));
|
||||
}
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public void setPrivateKeys(List<String> privateKeys) {
|
||||
this.privateKeys = privateKeys;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class ProfileKeysFragment extends Fragment {
|
||||
mRecyclerView = (RecyclerView) view.findViewById(R.id.rv_profile_keys);
|
||||
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
mProfileDrawerAdapter = new ProfileKeyAdapter(profile.getPrivateKeys());
|
||||
mProfileDrawerAdapter = new ProfileKeyAdapter(profile.getAddresses());
|
||||
mRecyclerView.setAdapter(mProfileDrawerAdapter);
|
||||
|
||||
return view;
|
||||
|
Loading…
x
Reference in New Issue
Block a user