parent
37c857aab5
commit
9bd78cbb15
|
@ -172,6 +172,10 @@
|
|||
android:name="com.stone.shop.view.InfoContentActivity"
|
||||
android:label="@string/app_name" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.stone.shop.view.InfoNewsContentActivity"
|
||||
android:label="@string/app_name" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tencent.tauth.AuthActivity"
|
||||
android:launchMode="singleTask"
|
||||
|
|
|
@ -172,6 +172,10 @@
|
|||
android:name="com.stone.shop.view.InfoContentActivity"
|
||||
android:label="@string/app_name" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.stone.shop.view.InfoNewsContentActivity"
|
||||
android:label="@string/app_name" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tencent.tauth.AuthActivity"
|
||||
android:launchMode="singleTask"
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -28,6 +28,9 @@
|
|||
# view AndroidManifest.xml #generated:171
|
||||
-keep class com.stone.shop.view.InfoContentActivity { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:175
|
||||
-keep class com.stone.shop.view.InfoNewsContentActivity { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:167
|
||||
-keep class com.stone.shop.view.InformationActivity { <init>(...); }
|
||||
|
||||
|
@ -100,10 +103,10 @@
|
|||
# view res/layout/activity_shop_item.xml #generated:6
|
||||
-keep class com.stone.ui.ViewPagerCompat { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:189
|
||||
# view AndroidManifest.xml #generated:193
|
||||
-keep class com.tencent.connect.common.AssistActivity { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:175
|
||||
# view AndroidManifest.xml #generated:179
|
||||
-keep class com.tencent.tauth.AuthActivity { <init>(...); }
|
||||
|
||||
# onClick res/layout/header_mine_info.xml #generated:8
|
||||
|
|
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="90dp"
|
||||
android:background="#F5F5F5"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
|
@ -22,7 +22,7 @@
|
|||
android:gravity="center_vertical|left"
|
||||
android:layout_weight="3"
|
||||
android:text="【博学堂】"
|
||||
android:textSize="14sp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="#FF8C00"/>
|
||||
|
||||
<TextView
|
||||
|
@ -32,7 +32,7 @@
|
|||
android:layout_weight="2"
|
||||
android:text="大礼堂电影预告大礼堂电影预告"
|
||||
android:textColor="#696969"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_news_date"
|
||||
|
@ -41,7 +41,7 @@
|
|||
android:layout_weight="3"
|
||||
android:gravity="center"
|
||||
android:text="2014-4-28"
|
||||
android:textSize="10sp"
|
||||
android:textSize="13sp"
|
||||
android:typeface="monospace" />
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
package com.stone.shop.view;
|
||||
|
||||
import com.stone.shop.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* 校园新闻内容显示——第二版
|
||||
* @author XCP
|
||||
* @date 2016-8-25
|
||||
*
|
||||
*/
|
||||
public class InfoNewsContentActivity extends Activity {
|
||||
|
||||
private static String TAG = "InfoNewsContentActivity";
|
||||
|
||||
private TextView tvNewsTitle;
|
||||
private TextView tvNewsAuthor;
|
||||
private TextView tvNewsTime;
|
||||
private TextView tvNewsContent;
|
||||
|
||||
private String newsTitle;
|
||||
private String newsAuthor;
|
||||
private String newsTime;
|
||||
private String newsContent;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_news);
|
||||
|
||||
getIntentData();
|
||||
initView();
|
||||
}
|
||||
|
||||
//获取Intent中传入的新闻数据
|
||||
private void getIntentData() {
|
||||
newsTitle = getIntent().getStringExtra("NewsTitle");
|
||||
newsAuthor = getIntent().getStringExtra("NewsAuthor");
|
||||
newsTime = getIntent().getStringExtra("NewsTime");
|
||||
newsContent = getIntent().getStringExtra("NewsContent");
|
||||
|
||||
newsTitle = splitString(newsTitle); //拆分字符串, 将新闻标题设置为 "】" 后面的内容
|
||||
}
|
||||
|
||||
private String splitString(String str) {
|
||||
String[] strs = null;
|
||||
if(str.equals("")){
|
||||
return "";
|
||||
} else if ( !(str.contains("【") || str.contains("】")) ) {
|
||||
return str;
|
||||
}
|
||||
strs = str.split("】");
|
||||
return strs[1];
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
tvNewsTitle = (TextView) findViewById(R.id.tv_news_title);
|
||||
tvNewsAuthor = (TextView) findViewById(R.id.tv_news_author);
|
||||
tvNewsTime = (TextView) findViewById(R.id.tv_news_time);
|
||||
tvNewsContent = (TextView) findViewById(R.id.tv_news_content);
|
||||
|
||||
tvNewsTitle.setText(newsTitle);
|
||||
tvNewsAuthor.setText("作者: "+newsAuthor);
|
||||
tvNewsTime.setText("发布日期 : "+newsTime);
|
||||
tvNewsContent.setText(newsContent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue