Fixed some layouts and updated dependencies
This commit is contained in:
@ -278,6 +278,10 @@ public class AddressDetailFragment extends Fragment {
|
||||
public void onPause() {
|
||||
if (item != null) {
|
||||
Singleton.getAddressRepository(getContext()).save(item);
|
||||
MainActivity mainActivity = MainActivity.getInstance();
|
||||
if (mainActivity != null && item.getPrivateKey() != null) {
|
||||
mainActivity.updateIdentityEntry(item);
|
||||
}
|
||||
}
|
||||
super.onPause();
|
||||
}
|
||||
|
@ -438,6 +438,19 @@ public class MainActivity extends AppCompatActivity
|
||||
}
|
||||
}
|
||||
|
||||
public void updateIdentityEntry(BitmessageAddress identity) {
|
||||
for (IProfile profile : accountHeader.getProfiles()) {
|
||||
if (profile instanceof ProfileDrawerItem) {
|
||||
if (identity.equals(((ProfileDrawerItem) profile).getTag())) {
|
||||
((ProfileDrawerItem) profile)
|
||||
.withName(identity.toString())
|
||||
.withTag(identity);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void removeIdentityEntry(BitmessageAddress identity) {
|
||||
for (IProfile profile : accountHeader.getProfiles()) {
|
||||
if (profile instanceof ProfileDrawerItem) {
|
||||
|
21
app/src/main/res/drawable/bg_item_activated.xml
Normal file
21
app/src/main/res/drawable/bg_item_activated.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 Christian Basler
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_activated="true" android:drawable="@color/bg_item_selected_state" />
|
||||
<item android:state_activated="false" android:drawable="@color/contentBackground" />
|
||||
</selector>
|
@ -20,7 +20,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:background="@color/bg_item_selected_state"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:showDividers="middle"
|
||||
@ -40,14 +39,20 @@
|
||||
tools:layout="@layout/fragment_message_list"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/message_detail_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@color/contentBackground"
|
||||
android:elevation="2dp"
|
||||
tools:layout="@layout/fragment_message_detail"/>
|
||||
android:background="@color/bg_item_selected_state">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/message_detail_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@color/contentBackground"
|
||||
android:elevation="2dp"
|
||||
tools:layout="@layout/fragment_message_detail"/>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -21,42 +21,42 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:src="@color/colorAccent"
|
||||
android:layout_margin="16dp"
|
||||
tools:ignore="ContentDescription"/>
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@color/colorAccent"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Name"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_alignTop="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:textStyle="bold"/>
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textStyle="bold"
|
||||
tools:text="Name"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="BM-2cW0000000000000000000000000000000"
|
||||
android:lines="1"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_alignBottom="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"/>
|
||||
android:id="@+id/address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:ellipsize="marquee"
|
||||
android:lines="1"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
tools:text="BM-2cW0000000000000000000000000000000"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -116,4 +116,4 @@
|
||||
android:elevation="2dp"
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:src="@drawable/public_key"/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -8,6 +8,7 @@
|
||||
android:id="@id/android:list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
@ -29,4 +30,4 @@
|
||||
app:elevation="8dp"
|
||||
app:fabGravity="bottom_end"
|
||||
app:fabMenu="@menu/fab_address"/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -27,7 +27,6 @@
|
||||
android:background="?attr/colorPrimary"
|
||||
android:elevation="4dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
|
@ -19,56 +19,57 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/activatedBackgroundIndicator">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:src="@color/colorAccent"
|
||||
android:layout_margin="16dp"
|
||||
tools:ignore="ContentDescription"/>
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@color/colorAccent"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Name"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_alignTop="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textStyle="bold"
|
||||
tools:text="Name"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stream_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Stream #"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_alignBottom="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"/>
|
||||
android:id="@+id/stream_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/avatar"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
tools:text="Stream #"/>
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/subscribed"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
app:iiv_color="@android:color/black"
|
||||
app:iiv_icon="cmd-rss"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
android:id="@+id/subscribed"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:iiv_color="@android:color/black"
|
||||
app:iiv_icon="cmd-rss"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -102,4 +102,5 @@ As an alternative you could configure a trusted node in the settings, but as of
|
||||
<string name="select_file_title">Select a File</string>
|
||||
<string name="select_identities_to_import">Please select the identities you want to import:</string>
|
||||
<string name="import_input_description">You can just paste the contents of an export or a ‘keys.dat’ file</string>
|
||||
<string name="name">Name</string>
|
||||
</resources>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="MaterialDrawerTheme.Light.DarkToolbar.TranslucentStatus">
|
||||
<item name="android:activatedBackgroundIndicator">@color/colorPrimaryLight</item>
|
||||
<item name="android:activatedBackgroundIndicator">@drawable/bg_item_activated</item>
|
||||
<item name="android:textColor">@color/colorPrimaryText</item>
|
||||
<item name="android:textColorSecondary">@color/colorSecondaryText</item>
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user