1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 08:52:18 -05:00

Extended IRC URI support and added Yaaic IRC link to about.

This commit is contained in:
Rey Rey 2011-06-29 03:43:08 -04:00 committed by Sebastian Kaspari
parent bce2523f98
commit 750df0de36
4 changed files with 38 additions and 3 deletions

View File

@ -63,13 +63,23 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/app_homepage" android:text="@string/app_homepage"
android:linksClickable="false" android:linksClickable="false"
android:autoLink="web" android:autoLink="none"
android:textSize="16sp" android:textSize="16sp"
android:textColorLink="#FF6CB600" android:gravity="center_horizontal" />
<TextView
android:id="@+id/about_irclink"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/app_irc"
android:linksClickable="false"
android:autoLink="none"
android:textSize="16sp"
android:textColor="#FF6CB600"
android:clickable="true"
android:gravity="center_horizontal" /> android:gravity="center_horizontal" />
<TextView <TextView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/licence_info" android:text="@string/licence_info"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>

View File

@ -4,6 +4,7 @@
<string name="app_full_name">Yet Another Android IRC Client</string> <string name="app_full_name">Yet Another Android IRC Client</string>
<string name="app_version">0.8</string> <string name="app_version">0.8</string>
<string name="app_homepage">http://www.yaaic.org</string> <string name="app_homepage">http://www.yaaic.org</string>
<string name="app_irc">irc://irc.epd-me.net/yaaic</string>
<string name="app_copyright">(C) 2009-2011 Sebastian Kaspari</string> <string name="app_copyright">(C) 2009-2011 Sebastian Kaspari</string>
<string name="licence_info"> <string name="licence_info">

View File

@ -23,8 +23,12 @@ package org.yaaic.activity;
import org.yaaic.R; import org.yaaic.R;
import android.app.Activity; import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
import android.view.Window; import android.view.Window;
import android.widget.TextView;
/** /**
* About activity * About activity
@ -33,6 +37,7 @@ import android.view.Window;
*/ */
public class AboutActivity extends Activity public class AboutActivity extends Activity
{ {
private TextView mIRCLink;
/** /**
* On create * On create
*/ */
@ -44,5 +49,18 @@ public class AboutActivity extends Activity
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.about); setContentView(R.layout.about);
mIRCLink = (TextView) findViewById(R.id.about_irclink);
mIRCLink.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent i = new Intent(getBaseContext(), org.yaaic.activity.AddServerActivity.class);
i.setData(Uri.parse(getString(R.string.app_irc)));
startActivity(i);
}
});
} }
} }

View File

@ -134,6 +134,12 @@ public class AddServerActivity extends Activity implements OnClickListener
if (uri.getPort() != -1) { if (uri.getPort() != -1) {
((EditText) findViewById(R.id.port)).setText(String.valueOf(uri.getPort())); ((EditText) findViewById(R.id.port)).setText(String.valueOf(uri.getPort()));
} }
if (uri.getPath() != null) {
channels.add(uri.getPath().replace('/', '#'));
}
if (uri.getQuery() != null) {
((EditText) findViewById(R.id.password)).setText(String.valueOf(uri.getQuery()));
}
} }
} }