。。。。。

master
Annnnnn 4 years ago
parent e80d911f0b
commit d8fc598509

@ -57,7 +57,7 @@ public class InfoActivity extends BaseActivity {
} }
}); });
ImageView infoToIndex=(ImageView) findViewById(R.id.info_to_index); ImageView infoToIndex=(ImageView) findViewById(R.id.info_to_index);//返回首页
infoToIndex.setOnClickListener(new View.OnClickListener() { infoToIndex.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -81,20 +81,21 @@ public class InfoActivity extends BaseActivity {
private void initRecNews(){ private void initRecNews(){
for(int i=0;i<2;i++){ for(int i=0;i<2;i++){
Recnews news1=new Recnews(R.drawable.rec_news1, Recnews news1=new Recnews(R.drawable.rec_news1,
"儿童急性B淋巴细胞白血病,除了传统疗法还有哪些前沿治疗方法呢?", "哪些人容易得白血病?得白血病的人往往有这种征兆...",
"急性淋巴细胞白血病ALL是儿童最常见的恶性肿瘤其中约85%为……" "白血病早期是会有一定症状的。比如持续发烧,一些急性白血病前期会出现持续发热,发热原因可能是由于感染……"
,102,"2021-11-6 09:19:54" ,102,"2021-11-6 09:19:54"
); );
recNews.add(news1); recNews.add(news1);
Recnews news2=new Recnews(R.drawable.rec_news2, Recnews news2=new Recnews(R.drawable.rec_news2,
"儿童急性B淋巴细胞白血病,除了传统疗法还有哪些前沿治疗方法呢?", "抨击误区——白血病化疗那么痛苦,干脆不做化疗了?!",
"急性淋巴细胞白血病ALL是儿童最常见的恶性肿瘤其中约85%为……" " “白血病化疗病死率高!不治病还促进病情严重!”“白血病用化疗药很痛苦的,别治了……"
,100,"2021-12-6 03:19:54" ,100,"2021-12-6 03:19:54"
); );
recNews.add(news2); recNews.add(news2);
Recnews news3=new Recnews(R.drawable.rec_news3, Recnews news3=new Recnews(R.drawable.rec_news3,
"儿童急性B淋巴细胞白血病,除了传统疗法还有哪些前沿治疗方法呢?", "小天使医典:儿童白血病康复指引",
"急性淋巴细胞白血病ALL是儿童最常见的恶性肿瘤其中约85%为……" "目前,医学界公认的儿童白血病的发病率为 4-6/10 万人。其中,新增儿童\n" +
"白血病患儿就占二分之一……"
,100,"2021-12-6 03:19:54" ,100,"2021-12-6 03:19:54"
); );
recNews.add(news3); recNews.add(news3);

@ -10,7 +10,6 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import com.example.leudaemialikeme.Dao.QuestionDao;
import com.example.leudaemialikeme.Fragment.CommunityFragment; import com.example.leudaemialikeme.Fragment.CommunityFragment;
import com.example.leudaemialikeme.Fragment.IndexFragment; import com.example.leudaemialikeme.Fragment.IndexFragment;
import com.example.leudaemialikeme.Fragment.MessageFragment; import com.example.leudaemialikeme.Fragment.MessageFragment;
@ -88,18 +87,6 @@ public class MainActivity extends BaseActivity {
.addToBackStack(null) .addToBackStack(null)
.commit(); .commit();
} }
// new Thread(new Runnable() {
// @Override
// public void run() {
// QuestionDao userDao=new QuestionDao();
// try {
// userDao.qSelect();
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// }).start();
} }
private void initFirstRun(int i) { private void initFirstRun(int i) {

@ -75,7 +75,7 @@ public class MessageFragment extends Fragment implements ViewPager.OnPageChangeL
adapter = new MessagePageFragmentAdapter(fragmentManager, channelList); adapter = new MessagePageFragmentAdapter(fragmentManager, channelList);
//参数 channelList 将被适配器用来在动态切换碎片的时候实时创建碎片 //设置 ViewPager 的适配器 //参数 channelList 将被适配器用来在动态切换碎片的时候实时创建碎片 //设置 ViewPager 的适配器
viewPager.setAdapter(adapter); viewPager.setAdapter(adapter);
viewPager.setOffscreenPageLimit(2); viewPager.setOffscreenPageLimit(2);//并设置预加载页数为2
//设置显示第 1 个碎片 //设置显示第 1 个碎片
viewPager.setCurrentItem(0);//这里设置显示第一个碎片 viewPager.setCurrentItem(0);//这里设置显示第一个碎片
//设置 ViewPager 的切换监听 //设置 ViewPager 的切换监听

@ -69,27 +69,6 @@
</LinearLayout> </LinearLayout>
<!-- <LinearLayout-->
<!-- android:id="@+id/detail_to_answer"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:padding="10dp">-->
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="查看全部回答"-->
<!-- android:textColor="#66c18c"-->
<!-- android:textSize="15dp" />-->
<!-- <ImageView-->
<!-- android:layout_width="24dp"-->
<!-- android:layout_height="13dp"-->
<!-- android:layout_gravity="center"-->
<!-- android:src="@drawable/forwardgreen" />-->
<!-- </LinearLayout>-->
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -299,13 +278,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="发布" /> android:text="发布" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

@ -1,130 +0,0 @@
<FrameLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.leudaemialikeme.Fragment.PrivateMsgFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_reminding" />
</LinearLayout>
<LinearLayout
android:layout_width="350dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView29"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="系统通知" />
<TextView
android:id="@+id/textView30"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="恭喜你,验证身份通过,成功加入小白帮....." />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_helper" />
</LinearLayout>
<LinearLayout
android:layout_width="353dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="小白帮_新人助手" />
<TextView
android:id="@+id/textView31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hi,你终于来啦,欢迎你加入......" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView34"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_user1" />
</LinearLayout>
<LinearLayout
android:layout_width="353dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView39"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="匿名用户" />
<TextView
android:id="@+id/textView46"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="你好,我也是刚刚确诊的病人...我能问你几个问题吗?" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
Loading…
Cancel
Save