|
|
@ -10,6 +10,7 @@ import android.os.Bundle; |
|
|
|
import android.support.annotation.NonNull; |
|
|
|
import android.support.design.widget.FloatingActionButton; |
|
|
|
import android.support.design.widget.Snackbar; |
|
|
|
import android.support.v7.view.menu.MenuView; |
|
|
|
import android.util.Log; |
|
|
|
import android.view.LayoutInflater; |
|
|
|
import android.view.View; |
|
|
@ -123,6 +124,8 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
setContentView(R.layout.cabinet); |
|
|
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); |
|
|
|
setSupportActionBar(toolbar); |
|
|
|
myToolbar = (Toolbar) findViewById(R.id.toolbar); |
|
|
|
setSupportActionBar(myToolbar); |
|
|
|
|
|
|
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); |
|
|
|
fab.setOnClickListener(new View.OnClickListener() { |
|
|
@ -133,9 +136,9 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
final DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); |
|
|
|
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); |
|
|
|
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( |
|
|
|
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); |
|
|
|
this, drawer, toolbar,R.string.navigation_drawer_open, R.string.navigation_drawer_close); |
|
|
|
toggle.syncState(); |
|
|
|
|
|
|
|
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); |
|
|
@ -151,7 +154,6 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
studentRate = (TextView) findViewById(R.id.studentRate); |
|
|
|
studentGroup = (TextView) findViewById(R.id.studentGroup); |
|
|
|
positionFaculty = (TextView) findViewById(R.id.positionFaculty); |
|
|
|
//newsTextView = (TextView) findViewById(R.id.newsTextView);
|
|
|
|
positionGroup = (TextView) findViewById(R.id.positionGroup); |
|
|
|
profileLayout = (RelativeLayout) findViewById(R.id.profileLayout); |
|
|
|
journalLayout = (RelativeLayout) findViewById(R.id.journalList); |
|
|
@ -162,8 +164,6 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
newsLayout = (RelativeLayout) findViewById(R.id.newsLayout); |
|
|
|
progressLayout.setVisibility(View.VISIBLE); |
|
|
|
profileLayout.setVisibility(View.VISIBLE); |
|
|
|
myToolbar = (Toolbar) findViewById(R.id.toolbar); |
|
|
|
setSupportActionBar(myToolbar); |
|
|
|
navigationView.getMenu().getItem(1).setChecked(true); |
|
|
|
myToolbar.setTitle(R.string.title_profile); |
|
|
|
|
|
|
@ -172,7 +172,6 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
|
|
|
|
AuthURL = "http://web-iais.admin.tstu.ru:7777/zion/f?p=stud_main"; |
|
|
|
loadSite(AuthURL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -193,15 +192,14 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean onOptionsItemSelected(MenuItem item) { |
|
|
|
// Handle action bar item clicks here. The action bar will
|
|
|
|
// automatically handle clicks on the Home/Up button, so long
|
|
|
|
// as you specify a parent activity in AndroidManifest.xml.
|
|
|
|
int id = item.getItemId(); |
|
|
|
|
|
|
|
//noinspection SimplifiableIfStatement
|
|
|
|
if (id == R.id.action_settings) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
if (id == R.id.action_reload_newsfeed) { |
|
|
|
feedController.drawNewsList(feedController.newsItemList); |
|
|
|
} |
|
|
|
|
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
} |
|
|
@ -381,10 +379,6 @@ public class CabinetActivity extends AppCompatActivity |
|
|
|
facultyList.setAdapter(facultyL); |
|
|
|
} |
|
|
|
|
|
|
|
public void onClickButtonNewsFeed(View view) { |
|
|
|
feedController.drawNewsList(feedController.newsItemList); |
|
|
|
} |
|
|
|
|
|
|
|
@TargetApi(19) |
|
|
|
public void getHTML(){ |
|
|
|
browser.evaluateJavascript("javascript:document.documentElement.outerHTML;", new ValueCallback<String>() { |
|
|
|