From 16e5015ec25d5470a22918a294276876358fcc79 Mon Sep 17 00:00:00 2001 From: hanxueqing <1045352474@qq.com> Date: Sat, 4 Jan 2020 00:17:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' # Conflicts: # app/src/main/res/layout/activity_main.xml --- .../cmknowledgegraph/SearchContentActivity.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/cmknowledgegraph/SearchContentActivity.java b/app/src/main/java/com/example/cmknowledgegraph/SearchContentActivity.java index 1d61ff8..7d34dd6 100644 --- a/app/src/main/java/com/example/cmknowledgegraph/SearchContentActivity.java +++ b/app/src/main/java/com/example/cmknowledgegraph/SearchContentActivity.java @@ -17,6 +17,9 @@ public class SearchContentActivity extends AppCompatActivity { * 显示在用户界面上 * @param savedInstanceState */ + + int left=50,top=80,right=500,bottom=100; + int gap=20;//内容与内容的间隔 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -25,7 +28,7 @@ public class SearchContentActivity extends AppCompatActivity { //设置内容的标题,位置,大小 String label_name=getIntent().getStringExtra("label").toString(); - text_title.setPadding(50,80,100,100); + text_title.setPadding(left,top,bottom,right); text_title.setText(label_name); text_title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); text_title.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); @@ -34,7 +37,14 @@ public class SearchContentActivity extends AppCompatActivity { for(int i=1;i< SearchServiceGet.label.size();i++){ TextView text_label=findViewById(R.id.search_content); text_label.setText(SearchServiceGet.label.get(i)); -// text_la + text_label.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); + text_label.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); + text_label.setPadding(left,gap,bottom,right); + + TextView text_content=findViewById(R.id.search_content); + text_content.setText(SearchServiceGet.content.get(i)); + text_content.setTextSize(TypedValue.COMPLEX_UNIT_SP, 13); + text_content.setPadding(left,gap,bottom,right); }