initial commit
This commit is contained in:
parent
ef5f8c4c26
commit
a5bfa5e54c
|
@ -20,8 +20,10 @@
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".newwindow.Profile"/>
|
<activity
|
||||||
|
android:name=".newwindow.Profile"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
|
@ -1,9 +1,7 @@
|
||||||
package org.nuclearfog.twidda;
|
package org.nuclearfog.twidda;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
@ -37,6 +35,9 @@ public class MainActivity extends AppCompatActivity
|
||||||
private ListView list;
|
private ListView list;
|
||||||
private String currentTab = "timeline";
|
private String currentTab = "timeline";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Activity
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -78,6 +79,9 @@ public class MainActivity extends AppCompatActivity
|
||||||
{
|
{
|
||||||
case R.id.action_profile:
|
case R.id.action_profile:
|
||||||
Intent i = new Intent(this, Profile.class);
|
Intent i = new Intent(this, Profile.class);
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("username","home");
|
||||||
|
i.putExtras(bundle);
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
break;
|
break;
|
||||||
case R.id.action_tweet:
|
case R.id.action_tweet:
|
||||||
|
@ -119,6 +123,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
Toolbar tool = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar tool = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(tool);
|
setSupportActionBar(tool);
|
||||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||||
|
setTabContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -144,7 +149,6 @@ public class MainActivity extends AppCompatActivity
|
||||||
public void onTabChanged(String tabId) {
|
public void onTabChanged(String tabId) {
|
||||||
currentTab = tabId;
|
currentTab = tabId;
|
||||||
setTabContent();}});
|
setTabContent();}});
|
||||||
setTabContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -208,5 +212,4 @@ public class MainActivity extends AppCompatActivity
|
||||||
private boolean loggedIn() {
|
private boolean loggedIn() {
|
||||||
return einstellungen.getBoolean("login", false);
|
return einstellungen.getBoolean("login", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -21,15 +21,27 @@ public class Profile extends AppCompatActivity {
|
||||||
private TextView username, bio,link,following;
|
private TextView username, bio,link,following;
|
||||||
private ImageView profile_img, profile_banner;
|
private ImageView profile_img, profile_banner;
|
||||||
private SwipeRefreshLayout refresh;
|
private SwipeRefreshLayout refresh;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstance){
|
protected void onCreate(Bundle savedInstance){
|
||||||
super.onCreate(savedInstance);
|
super.onCreate(savedInstance);
|
||||||
setContentView(R.layout.profile);
|
setContentView(R.layout.profile);
|
||||||
|
value = getIntent().getExtras().getString("username");
|
||||||
initElements();
|
initElements();
|
||||||
initTabs();
|
initTabs();
|
||||||
initSwipe();
|
initSwipe();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,6 +66,9 @@ public class Profile extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Init Tab Listener
|
||||||
|
*/
|
||||||
private void initTabs(){
|
private void initTabs(){
|
||||||
mtab = (TabHost)findViewById(R.id.tabhost);
|
mtab = (TabHost)findViewById(R.id.tabhost);
|
||||||
mtab.setup();
|
mtab.setup();
|
||||||
|
@ -63,7 +78,7 @@ public class Profile extends AppCompatActivity {
|
||||||
mtab.addTab(tab1);
|
mtab.addTab(tab1);
|
||||||
// Tab #2
|
// Tab #2
|
||||||
TabHost.TabSpec tab2 = mtab.newTabSpec("favorites");
|
TabHost.TabSpec tab2 = mtab.newTabSpec("favorites");
|
||||||
tab1.setIndicator("Favorits").setContent(R.id.home_tl);
|
tab2.setIndicator("Favorits").setContent(R.id.home_tl);
|
||||||
mtab.addTab(tab2);
|
mtab.addTab(tab2);
|
||||||
// Listener
|
// Listener
|
||||||
mtab.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
|
mtab.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
|
||||||
|
|
Loading…
Reference in New Issue