migrating to kotlin

This commit is contained in:
Mariotaku Lee 2016-07-02 12:05:23 +08:00
parent 23494b009f
commit 5ff715e77b
19 changed files with 113 additions and 270 deletions

View File

@ -79,7 +79,7 @@ class MessageEntriesAdapter(context: Context) : LoadMoreSupportAdapter<ViewHolde
// final int position = tag instanceof Integer ? (Integer) tag : -1;
// if (position == -1) return;
// switch (view.getId()) {
// case R.id.profile_image: {
// case R.id.profileImage: {
// if (mContext instanceof Activity) {
// final long account_id = getAccountKey(position);
// final long user_id = getConversationId(position);

View File

@ -1296,7 +1296,7 @@ class StatusFragment : BaseSupportFragment(), LoaderCallbacks<SingleResponse<Par
init {
itemView.setOnClickListener(this)
profileImageView = itemView.findViewById(R.id.profile_image) as ImageView
profileImageView = itemView.findViewById(R.id.profileImage) as ImageView
}
fun displayUser(item: ParcelableUser) {

View File

@ -334,7 +334,7 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
actionBar.subtitle = null
return
}
val spec = pagerAdapter!!.getTab(viewPager!!.currentItem)
val spec = pagerAdapter!!.getTab(viewPager.currentItem)
assert(spec.type != null)
when (spec.type) {
TAB_TYPE_STATUSES -> {
@ -401,14 +401,14 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
this.user = user
mAccount = account
if (user == null || user.key == null) {
profileImage!!.visibility = View.GONE
profileImage.visibility = View.GONE
profileType!!.visibility = View.GONE
if (activity is ATEActivity) {
setUiColor(Config.primaryColor(activity, activity.ateKey))
}
return
}
profileImage!!.visibility = View.VISIBLE
profileImage.visibility = View.VISIBLE
val resources = resources
val lm = loaderManager
lm.destroyLoader(LOADER_ID_USER)
@ -456,8 +456,8 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
followersContainer.followersCount!!.text = Utils.getLocalizedNumber(mLocale, user.followers_count)
friendsContainer.friendsCount!!.text = Utils.getLocalizedNumber(mLocale, user.friends_count)
listedContainer!!.visibility = if (user.listed_count < 0) View.GONE else View.VISIBLE
groupsContainer!!.visibility = if (groupsCount < 0) View.GONE else View.VISIBLE
listedContainer.visibility = if (user.listed_count < 0) View.GONE else View.VISIBLE
groupsContainer.visibility = if (groupsCount < 0) View.GONE else View.VISIBLE
mediaLoader.displayOriginalProfileImage(profileImage, user)
if (user.color != 0) {
@ -470,8 +470,8 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
val defWidth = resources.displayMetrics.widthPixels
val width = if (mBannerWidth > 0) mBannerWidth else defWidth
val bannerUrl = ParcelableUserUtils.getProfileBannerUrl(user)
if (ObjectUtils.notEqual(profileBanner!!.tag, bannerUrl) || profileBanner!!.drawable == null) {
profileBanner!!.tag = bannerUrl
if (ObjectUtils.notEqual(profileBanner.tag, bannerUrl) || profileBanner.drawable == null) {
profileBanner.tag = bannerUrl
mediaLoader.displayProfileBanner(profileBanner, bannerUrl, width)
}
val relationship = mRelationship
@ -486,9 +486,9 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
val currentDay = cal.get(Calendar.DAY_OF_MONTH)
cal.timeInMillis = user.created_at
if (cal.get(Calendar.MONTH) == currentMonth && cal.get(Calendar.DAY_OF_MONTH) == currentDay && !mHideBirthdayView) {
profileBirthdayBanner!!.visibility = View.VISIBLE
profileBirthdayBanner.visibility = View.VISIBLE
} else {
profileBirthdayBanner!!.visibility = View.GONE
profileBirthdayBanner.visibility = View.GONE
}
updateTitleAlpha()
invalidateOptionsMenu()
@ -496,7 +496,7 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
}
override fun getCurrentVisibleFragment(): Fragment? {
val currentItem = viewPager!!.currentItem
val currentItem = viewPager.currentItem
if (currentItem < 0 || currentItem >= pagerAdapter!!.count) return null
return pagerAdapter!!.instantiateItem(viewPager, currentItem) as Fragment
}
@ -632,48 +632,48 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
userFragmentView.setWindowInsetsListener { left, top, right, bottom ->
profileContentContainer!!.setPadding(0, top, 0, 0)
profileBannerSpace!!.statusBarHeight = top
profileBannerSpace.statusBarHeight = top
if (profileBannerSpace!!.toolbarHeight == 0) {
if (profileBannerSpace.toolbarHeight == 0) {
var toolbarHeight = toolbar.measuredHeight
if (toolbarHeight == 0) {
toolbarHeight = ThemeUtils.getActionBarHeight(context)
}
profileBannerSpace!!.toolbarHeight = toolbarHeight
profileBannerSpace.toolbarHeight = toolbarHeight
}
}
profileContentContainer!!.setOnSizeChangedListener { view, w, h, oldw, oldh ->
val toolbarHeight = toolbar.measuredHeight
userProfileDrawer!!.setPadding(0, toolbarHeight, 0, 0)
profileBannerSpace!!.toolbarHeight = toolbarHeight
profileBannerSpace.toolbarHeight = toolbarHeight
}
userProfileDrawer!!.setDrawerCallback(this)
pagerAdapter = SupportTabsAdapter(activity, childFragmentManager)
viewPager!!.offscreenPageLimit = 3
viewPager!!.adapter = pagerAdapter
toolbarTabs!!.setViewPager(viewPager)
toolbarTabs!!.setTabDisplayOption(TabPagerIndicator.LABEL)
toolbarTabs!!.setOnPageChangeListener(this)
viewPager.offscreenPageLimit = 3
viewPager.adapter = pagerAdapter
toolbarTabs.setViewPager(viewPager)
toolbarTabs.setTabDisplayOption(TabPagerIndicator.LABEL)
toolbarTabs.setOnPageChangeListener(this)
followContainer.follow.setOnClickListener(this)
profileImage!!.setOnClickListener(this)
profileBanner!!.setOnClickListener(this)
listedContainer!!.setOnClickListener(this)
groupsContainer!!.setOnClickListener(this)
followersContainer!!.setOnClickListener(this)
friendsContainer!!.setOnClickListener(this)
profileImage.setOnClickListener(this)
profileBanner.setOnClickListener(this)
listedContainer.setOnClickListener(this)
groupsContainer.setOnClickListener(this)
followersContainer.setOnClickListener(this)
friendsContainer.setOnClickListener(this)
errorIcon.setOnClickListener(this)
profileBirthdayBanner!!.setOnClickListener(this)
profileBanner!!.setOnSizeChangedListener(this)
profileBannerSpace!!.setOnTouchListener(this)
profileBirthdayBanner.setOnClickListener(this)
profileBanner.setOnSizeChangedListener(this)
profileBannerSpace.setOnTouchListener(this)
profileNameBackground!!.setBackgroundColor(mCardBackgroundColor)
profileDetailsContainer!!.setBackgroundColor(mCardBackgroundColor)
toolbarTabs!!.setBackgroundColor(mCardBackgroundColor)
profileNameBackground.setBackgroundColor(mCardBackgroundColor)
profileDetailsContainer.setBackgroundColor(mCardBackgroundColor)
toolbarTabs.setBackgroundColor(mCardBackgroundColor)
val actionBarElevation = ThemeUtils.getSupportActionBarElevation(activity)
ViewCompat.setElevation(toolbarTabs, actionBarElevation)
@ -734,9 +734,7 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
@UiThread
override fun onPrepareOptionsMenu(menu: Menu?) {
val twitter = twitterWrapper
val user = user
if (user == null) return
val user = user ?: return
val isMyself = user.account_key.maybeEquals(user.key)
val mentionItem = menu!!.findItem(R.id.mention)
@ -831,10 +829,10 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
if (userRelationship.filtering) {
val where = Expression.equalsArgs(Filters.Users.USER_KEY).sql
val whereArgs = arrayOf(user.key.toString())
cr!!.delete(Filters.Users.CONTENT_URI, where, whereArgs)
cr.delete(Filters.Users.CONTENT_URI, where, whereArgs)
Utils.showInfoMessage(activity, R.string.message_user_unmuted, false)
} else {
cr!!.insert(Filters.Users.CONTENT_URI, ContentValuesCreator.createFilteredUser(user))
cr.insert(Filters.Users.CONTENT_URI, ContentValuesCreator.createFilteredUser(user))
Utils.showInfoMessage(activity, R.string.message_user_muted, false)
}
getFriendship()
@ -975,14 +973,14 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
ACTION_NAVIGATION_PREVIOUS_TAB -> {
val previous = viewPager.currentItem - 1
if (previous >= 0 && previous < pagerAdapter!!.count) {
viewPager!!.setCurrentItem(previous, true)
viewPager.setCurrentItem(previous, true)
}
return true
}
ACTION_NAVIGATION_NEXT_TAB -> {
val next = viewPager.currentItem + 1
if (next >= 0 && next < pagerAdapter!!.count) {
viewPager!!.setCurrentItem(next, true)
viewPager.setCurrentItem(next, true)
}
return true
}
@ -1074,7 +1072,7 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
}
}
}
R.id.profile_image -> {
R.id.profileImage -> {
val url = Utils.getOriginalTwitterProfileImage(user.profile_image_url)
val profileImage = ParcelableMediaUtils.image(url)
profileImage.type = ParcelableMedia.Type.IMAGE
@ -1108,14 +1106,14 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
IntentUtils.openUserFriends(getActivity(), user.account_key, user.key,
user.screen_name)
}
R.id.name_container -> {
R.id.nameContainer -> {
if (user.account_key == user.key) return
IntentUtils.openProfileEditor(getActivity(), user.account_key)
}
R.id.profileBirthdayBanner -> {
mHideBirthdayView = true
profileBirthdayBanner!!.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out))
profileBirthdayBanner!!.visibility = View.GONE
profileBirthdayBanner.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out))
profileBirthdayBanner.visibility = View.GONE
}
}
@ -1175,10 +1173,10 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
}
override fun onTouch(v: View, event: MotionEvent): Boolean {
if (profileBirthdayBanner!!.visibility == View.VISIBLE) {
return profileBirthdayBanner!!.dispatchTouchEvent(event)
if (profileBirthdayBanner.visibility == View.VISIBLE) {
return profileBirthdayBanner.dispatchTouchEvent(event)
}
return profileBanner!!.dispatchTouchEvent(event)
return profileBanner.dispatchTouchEvent(event)
}
override fun scrollToStart(): Boolean {
@ -1270,7 +1268,7 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
mActionBarBackground = ActionBarDrawable(shadow!!)
if (!ThemeUtils.isWindowFloating(activity) && ThemeUtils.isTransparentBackground(activity.currentThemeBackgroundOption)) {
// mActionBarBackground.setAlpha(ThemeUtils.getActionBarAlpha(linkHandler.getCurrentThemeBackgroundAlpha()));
profileBanner!!.alpha = activity.currentThemeBackgroundAlpha / 255f
profileBanner.alpha = activity.currentThemeBackgroundAlpha / 255f
}
actionBar.setBackgroundDrawable(mActionBarBackground)
}
@ -1323,7 +1321,7 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
val stackedTabColor = mPrimaryColor
val profileContentHeight = (profileNameContainer!!.height + profileDetailsContainer!!.height).toFloat()
val profileContentHeight = (profileNameContainer!!.height + profileDetailsContainer.height).toFloat()
val tabOutlineAlphaFactor: Float
if (offset - spaceHeight > 0) {
tabOutlineAlphaFactor = 1f - TwidereMathUtils.clamp((offset - spaceHeight) / profileContentHeight, 0f, 1f)
@ -1344,21 +1342,21 @@ class UserFragment : BaseSupportFragment(), OnClickListener, OnLinkClickListener
val currentTabColor = sArgbEvaluator.evaluate(tabOutlineAlphaFactor,
stackedTabColor, mCardBackgroundColor) as Int
val tabBackground = toolbarTabs!!.background
val tabBackground = toolbarTabs.background
(tabBackground as ColorDrawable).color = currentTabColor
val tabItemIsDark = ThemeUtils.isLightColor(currentTabColor)
if (mPreviousTabItemIsDark == 0 || (if (tabItemIsDark) 1 else -1) != mPreviousTabItemIsDark) {
val tabContrastColor = ThemeUtils.getColorDependent(currentTabColor)
toolbarTabs!!.setIconColor(tabContrastColor)
toolbarTabs!!.setLabelColor(tabContrastColor)
toolbarTabs.setIconColor(tabContrastColor)
toolbarTabs.setLabelColor(tabContrastColor)
if (Config.coloredActionBar(activity, activity.ateKey)) {
toolbarTabs!!.setStripColor(tabContrastColor)
toolbarTabs.setStripColor(tabContrastColor)
} else {
toolbarTabs!!.setStripColor(ThemeUtils.getOptimalAccentColor(mUiColor,
toolbarTabs.setStripColor(ThemeUtils.getOptimalAccentColor(mUiColor,
tabContrastColor))
}
toolbarTabs!!.updateAppearance()
toolbarTabs.updateAppearance()
}
mPreviousTabItemIsDark = if (tabItemIsDark) 1 else -1

View File

@ -268,7 +268,7 @@ class UserListFragment : AbsToolbarTabPagesFragment(), OnClickListener, LoaderCa
R.id.errorContainer -> {
getUserListInfo(true)
}
R.id.profile_image -> {
R.id.profileImage -> {
val userList = this.userList ?: return
IntentUtils.openUserProfile(activity, userList.account_key,
userList.user_key, userList.user_screen_name, null,

View File

@ -83,7 +83,7 @@ class UserProfileEditorFragment : BaseSupportFragment(), OnSizeChangedListener,
if (user == null || task != null && !task!!.isFinished)
return
when (view.id) {
R.id.profile_image -> {
R.id.profileImage -> {
}
R.id.profileBanner -> {
}

View File

@ -59,12 +59,12 @@ public class GroupViewHolder extends ViewHolder implements View.OnClickListener,
super(itemView);
itemContent = (IColorLabelView) itemView.findViewById(R.id.item_content);
this.adapter = adapter;
profileImageView = (ImageView) itemView.findViewById(R.id.profile_image);
profileImageView = (ImageView) itemView.findViewById(R.id.profileImage);
nameView = (NameView) itemView.findViewById(R.id.name);
externalIndicator = (TextView) itemView.findViewById(R.id.external_indicator);
externalIndicator = (TextView) itemView.findViewById(R.id.externalIndicator);
descriptionView = (TextView) itemView.findViewById(R.id.description);
membersCountView = (TextView) itemView.findViewById(R.id.members_count);
adminsCountView = (TextView) itemView.findViewById(R.id.admins_count);
membersCountView = (TextView) itemView.findViewById(R.id.membersCount);
adminsCountView = (TextView) itemView.findViewById(R.id.adminsCount);
}
public void displayGroup(ParcelableGroup group) {

View File

@ -37,7 +37,7 @@ public class IncomingMessageViewHolder extends MessageViewHolder {
public IncomingMessageViewHolder(MessageConversationAdapter adapter, View itemView) {
super(adapter, itemView);
profileImageView = (ImageView) itemView.findViewById(R.id.profile_image);
profileImageView = (ImageView) itemView.findViewById(R.id.profileImage);
}
@Override

View File

@ -104,7 +104,7 @@ public class MessageEntryViewHolder extends ViewHolder implements OnClickListene
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.profile_image: {
case R.id.profileImage: {
adapter.onUserProfileClick(getLayoutPosition());
break;
}

View File

@ -65,7 +65,7 @@ public class MessageViewHolder extends ViewHolder {
textColorSecondary = a.getColor(R.styleable.MessageViewHolder_android_textColorSecondary, 0);
textColorSecondaryInverse = a.getColor(R.styleable.MessageViewHolder_android_textColorSecondaryInverse, 0);
a.recycle();
messageContent = (MessageBubbleView) itemView.findViewById(R.id.message_content);
messageContent = (MessageBubbleView) itemView.findViewById(R.id.messageContent);
messageContent.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {

View File

@ -98,7 +98,7 @@ public class UserListViewHolder extends ViewHolder implements View.OnClickListen
public void onClick(View v) {
if (userListClickListener == null) return;
switch (v.getId()) {
case R.id.item_content: {
case R.id.itemContent: {
userListClickListener.onUserListClick(this, getLayoutPosition());
break;
}
@ -109,7 +109,7 @@ public class UserListViewHolder extends ViewHolder implements View.OnClickListen
public boolean onLongClick(View v) {
if (userListClickListener == null) return false;
switch (v.getId()) {
case R.id.item_content: {
case R.id.itemContent: {
return userListClickListener.onUserListLongClick(this, getLayoutPosition());
}
}

View File

@ -72,22 +72,22 @@ public class UserViewHolder extends ViewHolder implements OnClickListener, OnLon
super(itemView);
this.adapter = adapter;
itemContent = (IColorLabelView) itemView.findViewById(R.id.item_content);
profileImageView = (ImageView) itemView.findViewById(R.id.profile_image);
profileTypeView = (ImageView) itemView.findViewById(R.id.profile_type);
profileImageView = (ImageView) itemView.findViewById(R.id.profileImage);
profileTypeView = (ImageView) itemView.findViewById(R.id.profileType);
nameView = (NameView) itemView.findViewById(R.id.name);
externalIndicator = (TextView) itemView.findViewById(R.id.external_indicator);
externalIndicator = (TextView) itemView.findViewById(R.id.externalIndicator);
descriptionView = (TextView) itemView.findViewById(R.id.description);
locationView = (TextView) itemView.findViewById(R.id.location);
urlView = (TextView) itemView.findViewById(R.id.url);
statusesCountView = (TextView) itemView.findViewById(R.id.statuses_count);
followersCountView = (TextView) itemView.findViewById(R.id.followers_count);
friendsCountView = (TextView) itemView.findViewById(R.id.friends_count);
actionsProgressContainer = itemView.findViewById(R.id.actions_progress_container);
actionsContainer = itemView.findViewById(R.id.actions_container);
acceptRequestButton = (ImageButton) itemView.findViewById(R.id.accept_request);
denyRequestButton = (ImageButton) itemView.findViewById(R.id.deny_request);
statusesCountView = (TextView) itemView.findViewById(R.id.statusesCount);
followersCountView = (TextView) itemView.findViewById(R.id.followersCount);
friendsCountView = (TextView) itemView.findViewById(R.id.friendsCount);
actionsProgressContainer = itemView.findViewById(R.id.actionsProgressContainer);
actionsContainer = itemView.findViewById(R.id.actionsContainer);
acceptRequestButton = (ImageButton) itemView.findViewById(R.id.acceptRequest);
denyRequestButton = (ImageButton) itemView.findViewById(R.id.denyRequest);
followButton = (ImageButton) itemView.findViewById(R.id.follow);
processingRequestProgress = itemView.findViewById(R.id.processing_request);
processingRequestProgress = itemView.findViewById(R.id.processingRequest);
}
public void displayUser(ParcelableUser user) {
@ -178,12 +178,12 @@ public class UserViewHolder extends ViewHolder implements OnClickListener, OnLon
userClickListener.onUserClick(this, getLayoutPosition());
break;
}
case R.id.accept_request: {
case R.id.acceptRequest: {
if (requestClickListener == null) return;
requestClickListener.onAcceptClicked(this, getLayoutPosition());
break;
}
case R.id.deny_request: {
case R.id.denyRequest: {
if (requestClickListener == null) return;
requestClickListener.onDenyClicked(this, getLayoutPosition());
break;

View File

@ -25,7 +25,7 @@
android:layout_height="match_parent">
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profile_image"
android:id="@+id/profileImage"
style="?profileImageStyle"
android:layout_width="@dimen/element_size_msmall"
android:layout_height="@dimen/element_size_msmall"

View File

@ -30,7 +30,7 @@
tools:context=".adapter.ParcelableUsersAdapter">
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profile_image"
android:id="@+id/profileImage"
style="?profileImageStyle"
android:layout_width="@dimen/icon_size_card_list_item"
android:layout_height="@dimen/icon_size_card_list_item"
@ -41,7 +41,8 @@
android:layout_marginRight="@dimen/element_spacing_normal"
android:contentDescription="@string/profile_image"
android:scaleType="fitCenter"
tools:src="@mipmap/ic_launcher"/>
tools:src="@mipmap/ic_launcher"
android:contextClickable="true"/>
<org.mariotaku.twidere.view.NameView
@ -62,7 +63,7 @@
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/external_indicator"
android:id="@+id/externalIndicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/name"
@ -80,7 +81,7 @@
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/name"
android:layout_alignStart="@+id/name"
android:layout_below="@+id/external_indicator"
android:layout_below="@+id/externalIndicator"
android:paddingTop="@dimen/element_spacing_small"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
@ -96,7 +97,7 @@
android:paddingTop="@dimen/element_spacing_small">
<TextView
android:id="@+id/members_count"
android:id="@+id/membersCount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -108,7 +109,7 @@
tools:text="255"/>
<TextView
android:id="@+id/admins_count"
android:id="@+id/adminsCount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"

View File

@ -25,14 +25,14 @@
android:padding="8dp">
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profile_image"
android:id="@+id/profileImage"
style="?profileImageStyle"
android:layout_width="@dimen/icon_size_card_list_item"
android:layout_height="@dimen/icon_size_card_list_item"
android:layout_alignTop="@+id/message_content"/>
android:layout_alignTop="@+id/messageContent"/>
<org.mariotaku.messagebubbleview.library.MessageBubbleView
android:id="@+id/message_content"
android:id="@+id/messageContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"

View File

@ -25,7 +25,7 @@
android:padding="8dp">
<org.mariotaku.messagebubbleview.library.MessageBubbleView
android:id="@+id/message_content"
android:id="@+id/messageContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"

View File

@ -18,7 +18,7 @@
-->
<org.mariotaku.twidere.view.ColorLabelRelativeLayout
android:id="@+id/item_content"
android:id="@+id/itemContent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -31,20 +31,20 @@
tools:context=".adapter.ParcelableUsersAdapter">
<RelativeLayout
android:id="@+id/profile_image_container"
android:id="@+id/profileImageContainer"
android:layout_width="@dimen/icon_size_card_list_item"
android:layout_height="@dimen/icon_size_card_list_item"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignTop="@+id/actions_progress_container"
android:layout_alignTop="@+id/actionsProgressContainer"
android:layout_marginEnd="@dimen/element_spacing_normal"
android:layout_marginRight="@dimen/element_spacing_normal"
android:clipChildren="false"
tools:visibility="visible">
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profile_image"
android:id="@+id/profileImage"
style="?profileImageStyle"
android:layout_width="@dimen/icon_size_card_list_item"
android:layout_height="@dimen/icon_size_card_list_item"
@ -53,12 +53,12 @@
tools:src="@mipmap/ic_launcher"/>
<ImageView
android:id="@+id/profile_type"
android:id="@+id/profileType"
android:layout_width="@dimen/icon_size_profile_type"
android:layout_height="@dimen/icon_size_profile_type"
android:layout_alignBottom="@id/profileImage"
android:layout_alignEnd="@id/profileImage"
android:layout_alignRight="@id/profileImage"
android:layout_alignBottom="@+id/profileImage"
android:layout_alignEnd="@+id/profileImage"
android:layout_alignRight="@+id/profileImage"
android:layout_marginBottom="@dimen/element_spacing_minus_small"
android:layout_marginEnd="@dimen/element_spacing_minus_normal"
android:layout_marginRight="@dimen/element_spacing_minus_normal"
@ -73,12 +73,12 @@
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/actions_progress_container"
android:layout_alignTop="@+id/actions_progress_container"
android:layout_toEndOf="@id/profile_image_container"
android:layout_toLeftOf="@+id/actions_progress_container"
android:layout_toRightOf="@id/profile_image_container"
android:layout_toStartOf="@+id/actions_progress_container"
android:layout_alignBottom="@+id/actionsProgressContainer"
android:layout_alignTop="@+id/actionsProgressContainer"
android:layout_toEndOf="@+id/profileImageContainer"
android:layout_toLeftOf="@+id/actionsProgressContainer"
android:layout_toRightOf="@+id/profileImageContainer"
android:layout_toStartOf="@+id/actionsProgressContainer"
android:gravity="center_vertical"
app:nv_primaryTextColor="?android:textColorPrimary"
app:nv_primaryTextStyle="bold"
@ -86,7 +86,7 @@
app:nv_twoLine="true"/>
<FrameLayout
android:id="@+id/actions_progress_container"
android:id="@+id/actionsProgressContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@ -96,7 +96,7 @@
android:minWidth="@dimen/button_size_content_card">
<LinearLayout
android:id="@+id/actions_container"
android:id="@+id/actionsContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -115,7 +115,7 @@
app:iabColor="@android:color/transparent"/>
<org.mariotaku.twidere.view.IconActionButton
android:id="@+id/accept_request"
android:id="@+id/acceptRequest"
style="?buttonStyleSmall"
android:layout_width="@dimen/button_size_content_card"
android:layout_height="@dimen/button_size_content_card"
@ -125,7 +125,7 @@
app:iabColor="@android:color/transparent"/>
<org.mariotaku.twidere.view.IconActionButton
android:id="@+id/deny_request"
android:id="@+id/denyRequest"
style="?buttonStyleSmall"
android:layout_width="@dimen/button_size_content_card"
android:layout_height="@dimen/button_size_content_card"
@ -138,7 +138,7 @@
</LinearLayout>
<ProgressBar
android:id="@+id/processing_request"
android:id="@+id/processingRequest"
style="?android:progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -147,7 +147,7 @@
</FrameLayout>
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/external_indicator"
android:id="@+id/externalIndicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/name"
@ -165,7 +165,7 @@
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/name"
android:layout_alignStart="@+id/name"
android:layout_below="@+id/external_indicator"
android:layout_below="@+id/externalIndicator"
android:paddingTop="@dimen/element_spacing_small"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
@ -211,7 +211,7 @@
android:paddingTop="@dimen/element_spacing_small">
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/statuses_count"
android:id="@+id/statusesCount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -223,7 +223,7 @@
tools:text="255"/>
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/followers_count"
android:id="@+id/followersCount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -235,7 +235,7 @@
tools:text="255"/>
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/friends_count"
android:id="@+id/friendsCount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Twidere - Twitter client for Android
~
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<android.support.v7.widget.CardView
android:id="@+id/card"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/element_spacing_normal"
app:cardBackgroundColor="?cardItemBackgroundColor"
app:cardCornerRadius="@dimen/corner_radius_card"
app:cardElevation="@dimen/elevation_card">
<include layout="@layout/layout_user_list_details_common"/>
</android.support.v7.widget.CardView>

View File

@ -1,87 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Twidere - Twitter client for Android
~
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<org.mariotaku.twidere.view.ColorLabelLinearLayout
android:id="@+id/user_list_details"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:splitMotionEvents="false"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/element_spacing_normal">
<LinearLayout
android:id="@+id/name_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/list_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="@+id/created_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
</LinearLayout>
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profile_image"
style="?profileImageStyle"
android:layout_width="@dimen/icon_size_card_details"
android:layout_height="@dimen/icon_size_card_details"
android:layout_weight="0"
android:contentDescription="@string/profile_image"
android:foreground="?selectableItemBackground"
android:scaleType="fitCenter"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.2dp"
android:background="?android:dividerVertical"/>
<TextView
android:id="@+id/description"
tools:text="@string/sample_status_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/element_spacing_normal"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
</org.mariotaku.twidere.view.ColorLabelLinearLayout>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Twidere - Twitter client for Android
~
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<android.support.v7.widget.CardView
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?cardItemBackgroundColor"
app:cardCornerRadius="0dp"
app:cardElevation="0dp"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/layout_user_list_details_common"/>
</android.support.v7.widget.CardView>