forked from AndroidFromFrankfurt/linuxnews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AboutActivity.java
42 lines (36 loc) · 1.16 KB
/
AboutActivity.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package org.androidfromfrankfurt.archnews;
import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.preference.PreferenceFragment;
public class AboutActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// ActionBar actionBar = getActionBar();
// actionBar.setDisplayHomeAsUpEnabled(true);
getActionBar().setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent)));
setContentView(R.layout.activity_xml);
if (savedInstanceState == null) {
getFragmentManager().beginTransaction().add(R.id.container, new AboutFragment()).commit();
}
}
// @Override
// public boolean onOptionsItemSelected(MenuItem item) {
// switch (item.getItemId()) {
// case android.R.id.home:
// finish();
// return true;
// }
// return super.onOptionsItemSelected(item);
// }
public static class AboutFragment extends PreferenceFragment {
public AboutFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.about);
}
}
}