change font size in conversation overview
This commit is contained in:
		
							parent
							
								
									cd75e55e3f
								
							
						
					
					
						commit
						6cfc6af886
					
				| 
						 | 
				
			
			@ -99,7 +99,15 @@ public class ConversationActivity extends XmppActivity implements OnConversation
 | 
			
		|||
		invalidateActionBarTitle();
 | 
			
		||||
		Intent intent = pendingViewIntent.pop();
 | 
			
		||||
		if (intent != null) {
 | 
			
		||||
			processViewIntent(intent);
 | 
			
		||||
			if (processViewIntent(intent)) {
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		if (binding.secondaryFragment != null && ConversationFragment.getConversation(this) == null) {
 | 
			
		||||
			Conversation conversation = ConversationsOverviewFragment.getSuggestion(this);
 | 
			
		||||
			if (conversation != null) {
 | 
			
		||||
				openConversation(conversation, null);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -117,14 +125,15 @@ public class ConversationActivity extends XmppActivity implements OnConversation
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	private void processViewIntent(Intent intent) {
 | 
			
		||||
	private boolean processViewIntent(Intent intent) {
 | 
			
		||||
		String uuid = intent.getStringExtra(EXTRA_CONVERSATION);
 | 
			
		||||
		Conversation conversation = uuid != null ? xmppConnectionService.findConversationByUuid(uuid) : null;
 | 
			
		||||
		if (conversation == null) {
 | 
			
		||||
			Log.d(Config.LOGTAG, "unable to view conversation with uuid:" + uuid);
 | 
			
		||||
			return;
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
		openConversation(conversation, intent.getExtras());
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,6 +30,7 @@
 | 
			
		|||
package eu.siacs.conversations.ui;
 | 
			
		||||
 | 
			
		||||
import android.app.Activity;
 | 
			
		||||
import android.app.Fragment;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.databinding.DataBindingUtil;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
| 
						 | 
				
			
			@ -190,4 +191,16 @@ public class ConversationsOverviewFragment extends XmppFragment implements Enhan
 | 
			
		|||
			}
 | 
			
		||||
		};
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static Conversation getSuggestion(Activity activity) {
 | 
			
		||||
		Fragment fragment = activity.getFragmentManager().findFragmentById(R.id.main_fragment);
 | 
			
		||||
		if (fragment != null && fragment instanceof ConversationsOverviewFragment) {
 | 
			
		||||
			List<Conversation> conversations = ((ConversationsOverviewFragment) fragment).conversations;
 | 
			
		||||
			if (conversations.size() > 0) {
 | 
			
		||||
				return conversations.get(0);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return null;
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,7 +35,7 @@
 | 
			
		|||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_centerVertical="true"
 | 
			
		||||
                android:layout_toRightOf="@+id/conversation_image"
 | 
			
		||||
                android:paddingLeft="8dp">
 | 
			
		||||
                android:paddingLeft="@dimen/avatar_item_distance">
 | 
			
		||||
 | 
			
		||||
                <TextView
 | 
			
		||||
                    android:id="@+id/conversation_name"
 | 
			
		||||
| 
						 | 
				
			
			@ -46,8 +46,7 @@
 | 
			
		|||
                    android:paddingRight="4dp"
 | 
			
		||||
                    android:maxLines="1"
 | 
			
		||||
                    android:ellipsize="end"
 | 
			
		||||
                    android:textColor="?attr/color_text_primary"
 | 
			
		||||
                    android:textSize="?attr/TextSizeHeadline"
 | 
			
		||||
                    android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
 | 
			
		||||
                    android:typeface="sans"/>
 | 
			
		||||
 | 
			
		||||
                <RelativeLayout
 | 
			
		||||
| 
						 | 
				
			
			@ -67,9 +66,8 @@
 | 
			
		|||
                        android:layout_alignParentLeft="true"
 | 
			
		||||
                        android:text="@string/me"
 | 
			
		||||
                        android:layout_marginRight="?attr/TextSeparation"
 | 
			
		||||
                        android:textColor="?attr/color_text_secondary"
 | 
			
		||||
                        android:visibility="visible"
 | 
			
		||||
                        android:textSize="?attr/TextSizeBody"/>
 | 
			
		||||
                        android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary"
 | 
			
		||||
                        android:visibility="visible"/>
 | 
			
		||||
 | 
			
		||||
                    <LinearLayout android:layout_width="match_parent"
 | 
			
		||||
                                  android:layout_height="wrap_content"
 | 
			
		||||
| 
						 | 
				
			
			@ -94,8 +92,7 @@
 | 
			
		|||
                            android:scrollHorizontally="false"
 | 
			
		||||
                            android:maxLines="1"
 | 
			
		||||
                            android:ellipsize="end"
 | 
			
		||||
                            android:textColor="?attr/color_text_primary"
 | 
			
		||||
                            android:textSize="?attr/TextSizeBody"/>
 | 
			
		||||
                            android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
 | 
			
		||||
                    </LinearLayout>
 | 
			
		||||
                    <ImageView
 | 
			
		||||
                        android:visibility="visible"
 | 
			
		||||
| 
						 | 
				
			
			@ -130,8 +127,7 @@
 | 
			
		|||
                    android:layout_alignBaseline="@+id/conversation_name"
 | 
			
		||||
                    android:layout_alignParentRight="true"
 | 
			
		||||
                    android:gravity="right"
 | 
			
		||||
                    android:textColor="?attr/color_text_secondary"
 | 
			
		||||
                    android:textSize="?attr/TextSizeInfo"/>
 | 
			
		||||
                    android:textAppearance="@style/TextAppearance.AppCompat.Caption"/>
 | 
			
		||||
            </RelativeLayout>
 | 
			
		||||
        </RelativeLayout>
 | 
			
		||||
    </FrameLayout>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,8 +11,8 @@
 | 
			
		|||
            android:layout_width="fill_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:background="?attr/color_background_primary"
 | 
			
		||||
            android:divider="@color/black12"
 | 
			
		||||
            android:dividerHeight="1dp"/>
 | 
			
		||||
            android:divider="@android:color/transparent"
 | 
			
		||||
            android:dividerHeight="0dp"/>
 | 
			
		||||
 | 
			
		||||
        <android.support.design.widget.FloatingActionButton
 | 
			
		||||
            android:id="@+id/fab"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue