This commit is contained in:
NudeDude 2018-01-06 18:43:58 +01:00
parent 22c93e1521
commit 75d05779b3
10 changed files with 58 additions and 42 deletions

View File

@ -113,6 +113,7 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
bundle.putBoolean("home", true); bundle.putBoolean("home", true);
intent.putExtras(bundle); intent.putExtras(bundle);
startActivity(intent); startActivity(intent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return true; return true;
case R.id.action_tweet: case R.id.action_tweet:
intent = new Intent(this, TweetPopup.class); intent = new Intent(this, TweetPopup.class);
@ -120,6 +121,7 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
b.putLong("TweetID", -1); b.putLong("TweetID", -1);
intent.putExtras(b); intent.putExtras(b);
startActivity(intent); startActivity(intent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return true; return true;
case R.id.action_settings: case R.id.action_settings:
intent = new Intent(this, AppSettings.class); intent = new Intent(this, AppSettings.class);

View File

@ -45,7 +45,6 @@ public class TweetDetail extends AppCompatActivity implements View.OnClickListen
@Override @Override
protected void onDestroy() { protected void onDestroy() {
// TODO save tweet
super.onDestroy(); super.onDestroy();
} }

View File

@ -1,6 +1,5 @@
package org.nuclearfog.twidda.window; package org.nuclearfog.twidda.window;
import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.view.View; import android.view.View;
@ -40,6 +39,7 @@ public class TweetPopup extends AppCompatActivity implements View.OnClickListene
@Override @Override
protected void onDestroy() { protected void onDestroy() {
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
super.onDestroy(); super.onDestroy();
} }
@ -56,6 +56,12 @@ public class TweetPopup extends AppCompatActivity implements View.OnClickListene
finish(); finish();
} }
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
private void send() { private void send() {
String tweet = tweetfield.getText().toString(); String tweet = tweetfield.getText().toString();
SendStatus sendTweet = new SendStatus(getApplicationContext()); SendStatus sendTweet = new SendStatus(getApplicationContext());

View File

@ -75,6 +75,9 @@ public class TwitterSearch extends AppCompatActivity implements AdapterView.OnIt
switch(id) { switch(id) {
case R.id.search_tweet: case R.id.search_tweet:
intent = new Intent(this, TweetPopup.class); intent = new Intent(this, TweetPopup.class);
Bundle b = new Bundle();
b.putLong("TweetID", -1);
intent.putExtras(b);
startActivity(intent); startActivity(intent);
break; break;
} }

View File

@ -71,6 +71,12 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen
getContent(); getContent();
} }
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
@Override @Override
public boolean onCreateOptionsMenu(Menu m) { public boolean onCreateOptionsMenu(Menu m) {
getMenuInflater().inflate(R.menu.profile, m); getMenuInflater().inflate(R.menu.profile, m);

View File

@ -7,7 +7,7 @@
<android.support.v7.widget.Toolbar <android.support.v7.widget.Toolbar
android:id="@+id/profile_toolbar" android:id="@+id/profile_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" /> android:layout_height="@dimen/bar_wide" />
<TabHost <TabHost
android:id="@+id/main_tabhost" android:id="@+id/main_tabhost"
@ -22,7 +22,7 @@
<TabWidget <TabWidget
android:id="@android:id/tabs" android:id="@android:id/tabs"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="@dimen/bar_wide" />
<FrameLayout <FrameLayout
android:id="@android:id/tabcontent" android:id="@android:id/tabcontent"

View File

@ -6,11 +6,10 @@
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.Toolbar
<android.support.v7.widget.Toolbar android:id="@+id/profile_toolbar"
android:id="@+id/profile_toolbar" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="@dimen/bar_wide" />
android:layout_height="?attr/actionBarSize" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -34,12 +33,11 @@
android:layout_width="64dp" android:layout_width="64dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_margin="5dp" android:layout_margin="5dp"
android:contentDescription="@string/profile_image" android:contentDescription="@string/profile_image" />
app:srcCompat="@color/soylentgreen" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_margin="5dp" android:layout_margin="5dp"
android:orientation="vertical"> android:orientation="vertical">
@ -47,13 +45,32 @@
android:id="@+id/profile_username" android:id="@+id/profile_username"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="5dp" /> android:layout_marginBottom="2dp" />
<TextView <TextView
android:id="@+id/profile_screenname" android:id="@+id/profile_screenname"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="5dp" /> android:layout_marginBottom="5dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/following"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/follower"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout> </LinearLayout>
@ -98,25 +115,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/following"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/follower"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<TabHost <TabHost
@ -132,7 +130,7 @@
<TabWidget <TabWidget
android:id="@android:id/tabs" android:id="@android:id/tabs"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="@dimen/bar_wide" />
<FrameLayout <FrameLayout
android:id="@android:id/tabcontent" android:id="@android:id/tabcontent"

View File

@ -9,7 +9,7 @@
<android.support.v7.widget.Toolbar <android.support.v7.widget.Toolbar
android:id="@+id/toolbar_setting" android:id="@+id/toolbar_setting"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" /> android:layout_height="@dimen/bar_wide" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -22,21 +22,22 @@
android:layout_marginBottom="5dip" android:layout_marginBottom="5dip"
android:layout_marginLeft="5dip" android:layout_marginLeft="5dip"
android:layout_marginRight="5dip" android:layout_marginRight="5dip"
android:gravity="right"
android:orientation="horizontal"> android:orientation="horizontal">
<Button <Button
android:id="@+id/sendTweet" android:id="@+id/sendTweet"
android:layout_width="match_parent" style="@style/Widget.AppCompat.Button.Borderless"
android:layout_height="wrap_content" android:layout_width="36dp"
android:layout_weight="1" /> android:layout_height="36dp"
android:layout_marginRight="50dp"
android:background="@drawable/tweet" />
<Button <Button
android:id="@+id/close" android:id="@+id/close"
style="@style/Widget.AppCompat.Button" style="@style/Widget.AppCompat.Button"
android:layout_width="wrap_content" android:layout_width="36dp"
android:layout_height="match_parent" android:layout_height="36dp"
android:layout_margin="2dip"
android:layout_weight="1"
android:background="@drawable/ic_cross" /> android:background="@drawable/ic_cross" />
</LinearLayout> </LinearLayout>

View File

@ -2,4 +2,5 @@
<!-- Default screen margins, per the Android Design guidelines. --> <!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="bar_wide">45dp</dimen>
</resources> </resources>