|
|
@ -180,8 +180,8 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
AuthURL = "http://web-iais.admin.tstu.ru:7777/zion/f?p=stud_main"; |
|
|
|
loadSite(AuthURL); |
|
|
|
|
|
|
|
addNewsItem(null); |
|
|
|
addNewsItem(null); |
|
|
|
addNewsItem("Hello guys!", "Its my first trying!", null); |
|
|
|
addNewsItem("Hello guys!", "Its my second trying!", null); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -307,24 +307,23 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void addNewsItem (View v) { |
|
|
|
//Это всего лишь тестовая функция
|
|
|
|
LinearLayout mainLayer = (LinearLayout) findViewById(R.id.newsfeed_scroll); |
|
|
|
public void addNewsItem (String title, String text, String link) { |
|
|
|
LayoutInflater inflater = getLayoutInflater(); |
|
|
|
mainLayer.addView(inflater.inflate(R.layout.cabinet_newsfeed_item, null)); |
|
|
|
LinearLayout newsFeed = (LinearLayout) findViewById(R.id.newsfeed_scroll); |
|
|
|
newsFeed.addView(inflater.inflate(R.layout.cabinet_newsfeed_item, null)); |
|
|
|
View layout = inflater.inflate(R.layout.cabinet_newsfeed_item, null); |
|
|
|
mainLayer.addView(layout); |
|
|
|
newsFeed.addView(layout); |
|
|
|
|
|
|
|
TextView text = (TextView) layout.findViewById(R.id.newsfeed_item_title); |
|
|
|
text.setText("В ТГТУ прошел региональный этап Всероссийской олимпиады школьников по информатике и ИКТ"); |
|
|
|
TextView titleTextView = (TextView) layout.findViewById(R.id.newsfeed_item_title); |
|
|
|
titleTextView.setText(title); |
|
|
|
|
|
|
|
|
|
|
|
TextView text2 = (TextView) layout.findViewById(R.id.newsfeed_item_text); |
|
|
|
TextView textView = (TextView) layout.findViewById(R.id.newsfeed_item_text); |
|
|
|
textView.setText(text); |
|
|
|
|
|
|
|
new DownloadImageTask((ImageView) layout.findViewById(R.id.newsfeed_item_image)) |
|
|
|
.execute("http://press.tstu.ru/photo/News/2017/0000494857574.jpg"); |
|
|
|
.execute(link); |
|
|
|
|
|
|
|
mainLayer.addView(inflater.inflate(R.layout.cabinet_newsfeed_item, null)); |
|
|
|
newsFeed.addView(inflater.inflate(R.layout.cabinet_newsfeed_item, null)); |
|
|
|
} |
|
|
|
|
|
|
|
public void loadSite (String url) { |
|
|
|