mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 17:02:21 -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: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"
|
||||||
|
@ -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">
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user