fix: enable swipe tabs and clamp group titles
This commit is contained in:
@@ -13,6 +13,7 @@ import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -60,6 +61,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
private Button tabDevices;
|
||||
private Button tabMe;
|
||||
private SwipeRefreshLayout screenRefresh;
|
||||
private ScrollView screenScroll;
|
||||
private LinearLayout screenContent;
|
||||
|
||||
private String activeTab = "conversations";
|
||||
@@ -174,6 +176,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
tabDevices = findViewById(R.id.tab_devices);
|
||||
tabMe = findViewById(R.id.tab_me);
|
||||
screenRefresh = findViewById(R.id.screen_refresh);
|
||||
screenScroll = findViewById(R.id.screen_scroll);
|
||||
screenContent = findViewById(R.id.screen_content);
|
||||
|
||||
String[] rootTabs = WechatSurfaceMapper.rootTabLabels();
|
||||
@@ -227,6 +230,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (screenScroll != null) {
|
||||
screenScroll.setOnTouchListener((v, event) -> {
|
||||
if (conversationPagerGestureDetector != null) {
|
||||
conversationPagerGestureDetector.onTouchEvent(event);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void applyInitialTab(@Nullable Intent intent) {
|
||||
|
||||
@@ -118,8 +118,10 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="会话"
|
||||
android:textColor="@color/boss_text_primary"
|
||||
android:textSize="22sp"
|
||||
|
||||
@@ -40,8 +40,10 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/screen_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="项目详情"
|
||||
android:textColor="@color/boss_text_primary"
|
||||
android:textSize="20sp"
|
||||
|
||||
Reference in New Issue
Block a user