mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-25 18:32:15 -05:00
Extended IRC URI support and added Yaaic IRC link to about.
This commit is contained in:
parent
bce2523f98
commit
750df0de36
@ -63,9 +63,19 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_homepage"
|
||||
android:linksClickable="false"
|
||||
android:autoLink="web"
|
||||
android:autoLink="none"
|
||||
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" />
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -4,6 +4,7 @@
|
||||
<string name="app_full_name">Yet Another Android IRC Client</string>
|
||||
<string name="app_version">0.8</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="licence_info">
|
||||
|
@ -23,8 +23,12 @@ package org.yaaic.activity;
|
||||
import org.yaaic.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* About activity
|
||||
@ -33,6 +37,7 @@ import android.view.Window;
|
||||
*/
|
||||
public class AboutActivity extends Activity
|
||||
{
|
||||
private TextView mIRCLink;
|
||||
/**
|
||||
* On create
|
||||
*/
|
||||
@ -44,5 +49,18 @@ public class AboutActivity extends Activity
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -134,6 +134,12 @@ public class AddServerActivity extends Activity implements OnClickListener
|
||||
if (uri.getPort() != -1) {
|
||||
((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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user