Appearance tweaks with our new dialog style

pull/14/head
Tim Su 14 years ago
parent abb456e0c7
commit a10887e577

@ -44,14 +44,6 @@ public class NoteDetailExposer extends BroadcastReceiver {
}
public String getTaskDetails(long id, boolean extended) {
if(Preferences.getBoolean(R.string.p_showNotes, false)) {
if(extended)
return null;
} else {
if(!extended)
return null;
}
Task task = PluginServices.getTaskService().fetchById(id, Task.NOTES);
if(task == null)
return null;
@ -59,6 +51,14 @@ public class NoteDetailExposer extends BroadcastReceiver {
if(notes.length() == 0)
return null;
if(Preferences.getBoolean(R.string.p_showNotes, false)) {
if(extended)
return null;
} else {
if(!extended)
return "<img src='silk_note'/>"; //$NON-NLS-1$
}
return "<img src='silk_note'/> " + notes; //$NON-NLS-1$
}

@ -8,6 +8,7 @@ import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ScrollView;
import android.widget.TextView;
@ -25,6 +26,7 @@ public class NoteViewingActivity extends Activity {
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.empty_linear_layout);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.dialog_title_bar);
getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
LinearLayout body = (LinearLayout) findViewById(R.id.body);
@ -35,7 +37,7 @@ public class NoteViewingActivity extends Activity {
ScrollView scrollView = new ScrollView(this);
TextView linkifiedTextView = new TextView(this);
linkifiedTextView.setText(task.getValue(Task.NOTES) + "\n\n"); //$NON-NLS-1$
linkifiedTextView.setText(task.getValue(Task.NOTES) + "\n"); //$NON-NLS-1$
Linkify.addLinks(linkifiedTextView, Linkify.ALL);
scrollView.addView(linkifiedTextView);

@ -6,6 +6,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#ffffff"
android:padding="6px"
android:paddingLeft="6dip"
android:ellipsize="marquee"
android:textSize="24px" />
android:textSize="20dip" />

@ -26,6 +26,8 @@
<style name="Theme.Dialog" parent="android:Theme.Dialog">
<item name="android:windowTitleBackgroundStyle">@style/DialogTitleBackground</item>
<item name="android:windowTitleSize">32dip</item>
<item name="android:layout_width">fill_parent</item>
</style>
<!--=============================================== TaskListActivity == -->

Loading…
Cancel
Save