forked from organicmaps/organicmaps
[android] Display username instead of profile.
This commit is contained in:
parent
735be8c6b1
commit
3a64022320
2 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
android:layout_marginStart="@dimen/margin_half"
|
||||
android:background="?circleAccent"
|
||||
android:scaleType="center"
|
||||
android:tint="?cardBackground"
|
||||
tools:src="@drawable/ic_device"/>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -83,8 +83,12 @@ public class SettingsActivity extends PreferenceActivity
|
|||
for (Header h : target)
|
||||
{
|
||||
mHeaders.put(h.id, h);
|
||||
// Hack to change profile header to username, if user is logged in.
|
||||
if (h.id == R.id.osm_profile && OsmOAuth.isAuthorized())
|
||||
{
|
||||
h.titleRes = 0;
|
||||
h.title = OsmOAuth.getUsername();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue