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